Anubhav Singh Rajput’s Post

View profile for Anubhav Singh Rajput

150+ questions on @leetcode | An android developer (java/kotlin) | pursuing Bachelors of computer application from @Sarala Birla University

Day 127 of #180DaysOfCode: Single Number II 🌟 day 9/10 of bit manipulation Today, I worked on the "Single Number II" problem, where the challenge was to find the number that appears exactly once in an array, while every other number appears three times. 🔄✨ To solve this problem, I used a bitwise manipulation approach that efficiently tracks the frequency of each bit across all numbers in the array. By counting the number of times each bit is set, I identified the bits corresponding to the unique number. Any bit count that is not divisible by three corresponds to the bits of the single number. This problem was a great opportunity to deepen my understanding of bitwise operations and reinforce my skills in solving problems with optimal time complexity! 🚀💻 #180DaysOfCode #SingleNumberII #BitwiseManipulation #Optimization #ProblemSolving #Tech #Algorithms

  • No alternative text description for this image

To view or add a comment, sign in

Explore topics