1. Design LRU cache with max capacity, insert, get in O(1) 2. Sort array of RGB objects so that first will be all R, then all G and finally all B 3. Buy/Sell stocks question 4. You have infinite stream of 1/0 bits, in each point you need to say if the current stream is divided by 7 . using O(1) place.
Anonymous
1. Using double linked list 4. save current numbers module of 7.
Check out your Company Bowl for anonymous work chats.