Interview ProcessTest → Test → Other Interview → Technical Interview → Other Interview
No. of Questions
30 general aptitude type, 20 pseudo code type. The pseudo code type questions had no coding- just identification of error, correct o/p etc
Pure coding round just write code and submit (no compilation). There were three questions in this round: Given an array and a number N,find whether there are tuples in the array with difference equal to N. Insert an element into a sorted circular linked list. Given a BST and an element N,output the leftmost node at the same level at that element in the tree
This round tried my patience! It was almost exclusively a discussionof my areas of interest. I said network security – so he went into the detailsof cryptography and attacks like buffer overflow. That went on for say 50minutes or so. After that he asked me a coding problem.The problem was to compress a string in place. Having seen thefamous string expansion in place problem many times, I promptly said run lengthencoding (i.e. compress aaaaaabbbbbccc to a6b5c3 for example). He asked me tocode it and write a few test cases for it
This was a nice, pure problem-solving round.First, he asked me the famous “Tell me about yourself” and “How wereyour earlier rounds” questions. But trust me, they were only ice-breakers. Then he started his session. He asked me to tell him beforehand if Iknew the solution to any problem. The following were his questions:WAP to print a matrix spirally.I told him I knew the problem so he skipped it.Search for an element in arotated sorted array (of course in sublinear time!). I tried a twist to binarysearch using rotations, but he pointed out an infinite loop in my code, which Ifailed to correct! Then he changed the question to find the number of rotationsin such an array in sublinear time. This also I could only solve for distinctelements. So he went to the next question.Really nice DP problem. Givenan amount and an array containing possible coin denominations, determine thesmallest no of coins in which the amount may be formed. Assume you have infinite units of each denomination
This was the hardest and best round. The interviewer was a finalround specialist!First, he asked me about my internship, which I explained to him. Hediscussed it for hardly 10 minutes.Then he started his attack! Even this guy told me that if I knew aquestion, I should ask him to skip it. There were three questions here:Given a linked list, swap itsnodes pair-wise. This is not so simple as it looks, trust me. It has more edgecases than apparent and was a true test of pointer manipulation.Given an array, bring all itsdistinct elements to the top in whatsoever order; the rest of the array is notimportant. First I suggested in O(n) space. Then he asked me to do it withoutextra space. I needed a sorted array for that, which he asked me to assume.Then it is solvable under the required conditions.Given a matrix, find an elementthat is max in its row and min in its col. However, he said in the end, thiswas not the question. The actual question was whether there can be more thanone such element in the matrix, assuming all elements are distinct. Wrote a small proof that there cannot
These guys focus a lot on data structures, especially the basic ones like linked lists and binary trees. I felt these are the topics with max weightage (just my personal opinion!).