Posts

Showing posts with the label Brain teaser

Finding the first missing number given the list with numbers [reviewed]

Image
Problem Given input [2,3,1,5,88,100], find the first missing number. All number are positive numbers. (1 - n) In the above example, 4 is the first missing number.

Power of 3 problem

Problem Write function to determine if given unsigned 32-bit number is a power of 3     int is_power_of_3(uint32_t n)