Round1 (Written)
1. Find the maximum element in an array which is first increasing and then decreasing. Time Complexity should be less than O(n).
http://www.geeksforgeeks.org/find-the-maximum-element-in-an-array-which-is-first-increasing-and-then-decreasing/
2. Given an expression in string, check for balanced parenthesis.
http://www.geeksforgeeks.org/check-for-balanced-parentheses-in-an-expression/
3. Find the level in binary tree which has maximum no of nodes. Print no of nodes and level.
Round2 (Face to Face)
1. Print a binary tree in vertical order.
http://www.geeksforgeeks.org/print-binary-tree-vertical-order/
2. Search for an element in rotated and sorted array
http://www.geeksforgeeks.org/search-an-element-in-a-sorted-and-pivoted-array/
Round3 (Face to Face)
Design for scheduling jobs in distributed system. Give all the apis which will be exposed to user .
What all components will be involved at the backend. What data structures will be used etc.
Round4 (Face to Face)
1. Given a matrix with each cell containing no. of gold coins and a constraint that you can only move right or down from the top left corner to bottom right corner, find the path that gives you maximum gold coins and maximum no of gold coins that can be collected. (Dynamic Programming)
2. There are trillions of stars in sky and you are given distance of each start from the earth. You have to find million stars with least distance form the earth.
3. There are n conference rooms and all are booked for a particular interval of time.
Let's say there are 3 rooms and their time slot of booking are:
Room1: {1,3} {6,7}, {8,9}
Room2: {2,5}, {9,10}
Room 3: {3,7}
Find the total no of hours in which all the rooms are unoccupied.
For above case, if we consider total no of hours as 20, all rooms are vacant for (20-8)=12 hours.
Solution:
1. Sort all the intervals based on start time.
2. Merge all overlapping interval
3. Find total no of hours covered by those intervals.
4. Subtract from total hour and return.
4. There are n workers and their wages are given for each day. If a worker work on day 1, he can only work after 3rd day. If he works on 3rd day, he can work after 5th day. Choose the day in such a way that he can maximize profit.
For ex: wages[] ={5, 1, 1, 10, 8, 3,5,12}
Maximum profit here is (5+10+12)=27 (Dynamic programming question)
http://ideone.com/ELwiJa
Round5 (Face to Face)
Manager Round
1. Find kth non repeating element in in stream of integers.
2. Merge 2 sorted array to get sorted result array.
3. You are given an array whose each element represent height of the array. The width of every tower is 1. It starts raining. How much water is collected between the towers?
Ex: [1,3,5,7,2] = answer is 2 units between 5 and 7
4. You are having a conflict with your manager regarding how to prioritize your task . How would you convince him?
5. What is the biggest technical goof up you had lately?
6. What are you passionate about?
1. Find the maximum element in an array which is first increasing and then decreasing. Time Complexity should be less than O(n).
http://www.geeksforgeeks.org/find-the-maximum-element-in-an-array-which-is-first-increasing-and-then-decreasing/
2. Given an expression in string, check for balanced parenthesis.
http://www.geeksforgeeks.org/check-for-balanced-parentheses-in-an-expression/
3. Find the level in binary tree which has maximum no of nodes. Print no of nodes and level.
Round2 (Face to Face)
1. Print a binary tree in vertical order.
http://www.geeksforgeeks.org/print-binary-tree-vertical-order/
2. Search for an element in rotated and sorted array
http://www.geeksforgeeks.org/search-an-element-in-a-sorted-and-pivoted-array/
Round3 (Face to Face)
Design for scheduling jobs in distributed system. Give all the apis which will be exposed to user .
What all components will be involved at the backend. What data structures will be used etc.
Round4 (Face to Face)
1. Given a matrix with each cell containing no. of gold coins and a constraint that you can only move right or down from the top left corner to bottom right corner, find the path that gives you maximum gold coins and maximum no of gold coins that can be collected. (Dynamic Programming)
2. There are trillions of stars in sky and you are given distance of each start from the earth. You have to find million stars with least distance form the earth.
3. There are n conference rooms and all are booked for a particular interval of time.
Let's say there are 3 rooms and their time slot of booking are:
Room1: {1,3} {6,7}, {8,9}
Room2: {2,5}, {9,10}
Room 3: {3,7}
Find the total no of hours in which all the rooms are unoccupied.
For above case, if we consider total no of hours as 20, all rooms are vacant for (20-8)=12 hours.
Solution:
1. Sort all the intervals based on start time.
2. Merge all overlapping interval
3. Find total no of hours covered by those intervals.
4. Subtract from total hour and return.
4. There are n workers and their wages are given for each day. If a worker work on day 1, he can only work after 3rd day. If he works on 3rd day, he can work after 5th day. Choose the day in such a way that he can maximize profit.
For ex: wages[] ={5, 1, 1, 10, 8, 3,5,12}
Maximum profit here is (5+10+12)=27 (Dynamic programming question)
http://ideone.com/ELwiJa
Round5 (Face to Face)
Manager Round
1. Find kth non repeating element in in stream of integers.
2. Merge 2 sorted array to get sorted result array.
3. You are given an array whose each element represent height of the array. The width of every tower is 1. It starts raining. How much water is collected between the towers?
Ex: [1,3,5,7,2] = answer is 2 units between 5 and 7
4. You are having a conflict with your manager regarding how to prioritize your task . How would you convince him?
5. What is the biggest technical goof up you had lately?
6. What are you passionate about?