First online coding
second 2 technical round.
third HR round
(1) There is a stream of characters and at any time we need to find and remove (means set occurrence = 0) character which has maximum occurrence till now. Design data structure and algorithm for same. (I used standard Heap and Hash table setup, then was asked if we can replace lg(n) Heap operations with some efficient operation in practical scenario. I came up with doubly linked list and moving character to front on basis of its occurrences).
(2) Given a gold mine of n*m dimension. Each field in this mine contains an integer which is amount of gold in tons. Initially miner is in first column but could be at any row i. He can move only (right ->, right up /, right down \). Find out maximum amount of gold he can collect and path followed by him.
(3) Given two string str and pat. Find minimum window in str which contains all characters from string pat.