1. Implement the pop function of stack using an array 2. How to detect a loop in a linked list 3. I am given an unsorted array which contains all except one number from 1 to n. Detect the missing number. 4. I am given an array that has all the numbers repeated twice, except one which only occurs once. Detect the number. (I was only able to solve this after one of the interviewers gave me a hint to convert the numbers to their respective bits). 5. Calculate a postfix expression. Ex: 1 2 3 + * will result in 1 * (2+3) = 5. Then they asked me some easy logical questions. 1. I am given two ropes, which burn for 30 minutes each if lighted at one end. I am given a lighter. How can I calculate 45 min using only these two ropes and a lighter? (There is a very similar question on Heard on the Street) 2. I am given nine dots in total; three in three rows each. How can I connect all the dots using only 4 lines? I couldn't lift my pen once I started. Then they asked me if I was familiar with databases. I said a little; I have done some projects using MongoDB. They asked me what format does MongoDB store data in. I didn't know the exact answer but I knew it was related to JSON, so I just said that.
Check out your Company Bowl for anonymous work chats.