Google Onsite Rounds
Round 1:
Given a sparse bit array A of size M stored in a database. The database provides an API query(L,R) which returns 1 if there is at least one bit equal to one in A[L..R] and 0 otherwise.
You want to find all the 1 bits in a reasonable number of queries. E.g. for array 01100000001, positions of 1 bits are {1, 2, 10}.
Return the array of all the positions of 1's.
solved it in 10 mins using binary search, then was asked to do it recursively, then was asked it to do using divide and conquer.
Wal able to write the code for all approached still recruited said the feedback is negative.
Round 2:
https://leetcode.com/discuss/interview-question/5063427/google-onsite-round-2
Round 3:
given a and b in int return their diff in string, a and b could be largeee values.
Round 4:
(googleyness: 4 fun and easy going questions)