Online Round: 2 Programming questions for 2 Hours
- Convert set of strings in number as given on phone keypad. String will contain only lower case characters. Print these strings with numbers in descending order of numbers, if numbers are same then lexicographical order of strings. Input: amazon, rat,pat Output: 262966 amazon 728 pat 728 rat
- In a M*N maze you can move in any direction(left,right,up,down). There are bomb on some positions. Starting from (0,0) find the number of moves require to exit from the maze. Exit point is (m-1,n-1). If its not possible then return -1. Similar to Minesweeper Game.
- https://www.gayle.com/consulting in-place. Had to write proper code for it.
- Sort an array of 0s, 1s and 2s in place. He asked me if I knew the question, I said yes. Then he told me to write code covering all corner cases.
- Find a pair with given target in BST . Asked all possible solutions and then asked to write code for it.
- Overlapping Intervals. Code for it.
- Number of occurrence Asked to explain the solution then to write the code.
- Correct a deformed BST. All kind of approaches and proper reasoning for each. Then asked to write the code.
- Array question. similar to Non Repeating Character.
- Level order traversal in spiral form.