There is very long array of ints, and you are given pointer to base addr of
this array.. each int is 16bit representation... you need to return the
pointer to tht "bit" inside array where longest sequence of "1"s start
take this simple example:
Array = {15,7,2,1,0,23}
1111,0111,0010,0001,0000,10111
^
Result: Pointer should point to 1st bit of number 15.
another example : 1111,0111,0011,1110,0000,10111
_____
third index from starting is the
answer i.e i=2 , if i start from 0 as it has maximum 1's(5)
--
With Regards,
*Jalaj Jaiswal* (+919019947895)
Software developer, Cisco Systems
Final Year Undergraduate,
IIIT ALLAHABAD
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.