Tuesday, November 18, 2008

amazon on-stie interview questions(zz)

发信人: chuncl (ray), 信区: JobHunting
标 题: amazon on-stie interview questions
发信站: BBS 未名空间站 (Tue Nov 18 15:21:21 2008)

Today, I got the call that I am failed. pretty sad. I got a lot from this
board, hope these interview questions would be helpful for others, and wish
everyone get good luck.

1st person
Given n numbers, there is one appeared more than n/2 times, find it, coding
Reverse double link list, coding
design data structure that support do/undo

2nd
Serialize a Binary tree (Not BST) into array.
I mentioned
a) Something like heap, but space expensive for un-balanced tree
b) pre-order + in-order
c) level by level

Then, the interviewer ask to just use preorder to do it, Using 0 to denote
the NULL. I wrote code using markers.
Then he asked what happened if we are not allowed using any other markers,
then some discussion.

3rd
Research related questions regarding machine learning, text mining, and pattern
recognition. Lunch

4th
Find longest repetitive substrings in a string.
I gave suffix array approach and wrote the code, but the interviewer thought
brutal approach is better ( I tried to communicate with him, but it seems
not go well and he seems a little bit upset)
Then ask me the mechanism of java garbage collection, how to implement/
simulate it in c++
How to design quick search data structure when you input an address, then
output the longitude/latitude.
Some c++ questions

5th
Design a excel worksheet, that support literal, e.g., “500”, also
expressions, e.g., A4=“A1+A5”, A4=f(A1,A2,A6)..etc

6th
Design desktop gui. On gui, there is “program”, “folder”, “printer”,
“garbage can”, “file”, we can drag each one to another one. But some are
legal, some are not. E.g., when we drag file into printer, it is legal, and
printer will print file out. When we drag a folder into printer, it is also
legal, printer will print out all the files in the folder(could be
recursive). But some operations are illegal, e.g., when we drag "garbage can
" to printer, there should error message or exception sent out.
Hint: don’t use static binding e.g., ID, but use dynamic binding and
polymorphisms.

2 comments:

Unknown said...

For nice java interview questions have a look at javapapers.com. It has questions for core java, jsp and servlets and also contains in-depts answers

Unknown said...

For nice java interview questions have a look at javapapers.com. It has questions for core java, jsp and servlets and also contains in-depts answers