A couple of weeks earlier, I was held up in giving so many interviews..so many that:
first, I have lost count, second, I did manage to screw my schedule so badly that some of my interviews overlapped.
------------------------------------------------------------------------------------------
Here are some of the questions I faced by MS, Netapp, Juniper, Akamai and Movik.
Data structures/Algorithms
1. In a singly linked list of integers, find out two numbers which sum upto a given third number..
and yes, take care of time complexity..
Ans1. traverse the list from both the ends, O(n/2)
2. How do you check if a single linked list can be merged ???
Ans1. ?? check for loops/cycles ??,
3. In a question paper, you need to answer just enough questions so as to minimize the time spent in answering and getting jsut enought marks so that you can pass the paper. How will your strategy be ?
Ans1. This is an open-ended question. Its basically an optimization problem, LPP...define the constraints, you have the objective function...where..blah blah blah..
4. System Calls
5. Implement sizeof
Networks
1. Purpose of IP, TCP, ATM
2. Life cycle of a packet
3. Questions on MTU, ping, traceroute
4. General questions on performance, scalability w.r.t routers
5. TCP - slowstart, congestion control { this since my thesis is based on congestion control }
6. UDP, port numbers, segmentation, reassembly
7. Questions on DNS lookups
Puzzles
1. A farmer has a 20 pound stone which he uses to measure his grains. His friend borrows it to to use it for a day. When he returns it the stone is broken into 4 pieces. The farmer who lent it is troubled wondering how can me measure his grains now. The other farmer consoles him saying, "Not to worry, you can use these four smaller stones to determine the weight from 1 to 100 pounds". What are the individual weights of the stones ?
2. 25 horses, 5 tracks, find out the least number of races that can be conducted to determine the fastest three horses. You have no stopwatch to clock the timings.
Ans. Should be around 7-8 rounds of races...The solution can be worked..Its fairly easy
------------------------------------------------------------------------------------------
Some questions were really..banal. The only interesting ones were the puzzles and the ones related to datastructures. But none of the interviews were really enjoyable. The last time I enjoyed the entire interview process was the last time I was interviewed by Netapp in 2003. This time around, in many cases, the interviewers seemed bored and uninterested. Most questions were to easy to answer. There were some real real turn-offs as well. Unfortunately you have to go through this process whether you like it or not.
Was scheduled for telephonic interviews with Google and Citrix....but never happened. They rescheduled the interview slot..and again they didn't call up. And the third time they tried to schedule a call, I was already on board. I'm sure the interview with Google would have atleast been a good experience.
4 comments:
chota chetan toh badaa ho gaya :)
For Q1: List is singly linked, how will you traverse it from both ends?
Besides, for list of size n there will be total of n(n-1)/2 sums, how can you do it on O(n), I see it to be O(n^2). Can you outline the O(n) algo?
@shaolin,
You got me. I vaguely remember the interviewer telling me it was just a linked list. I might have jumbled up with the questions and answers.
Assuming its a single linked list, it has to be O(n^2) with two loops running. I don't think it can be done in O(n). But, I guess there should be a more efficient solution.
Another related qn was, if we were to choose a better datastructure to address the same problem, what would they be ?
A hashtable, a B-Tree or a variant of it should be more efficient. What say ?
Oh yes, interviewers have a knack of confusing candidates :)
As to better data structure... I think any ds that will enforce ascending or descending order on numbers should be efficient. I will think about it and let you know if I get something useful.
Thanks for sharing!
Post a Comment