I had my first amazon interview this afternoon. I would like to write down the questions he asked me below and solve the unsolved problems later.
First question: why amazon?
Second question: How do you use the 'static' keyword in Java? Can static method access class data member?
Second question: what is an abstract class? how do you use it?
Third question: what is an interface? How do you use an interface?
Fourth question: have you heard of multi-inheritance? what is it? why Java does not have multi-inheritance feature? Is there any problems with that?
Fifth question: when you have a bunch of values/ data, how would you store it (the best data structure you can think of) so that they can be accessed in a very efficient way?
Sixth question: there is a website, and that website keeps a log file on the system. The log file logs a bunch of records. Each record has three fields: (userID, date, pageID). Now we need to parse that log file. Give an algorithm or a program to output any userID that appears with different dates and different pageIDs (which means that user visit the website on different dates and also visit different pages). What is the time complexity of your algorithm.
Seventh question: you have any questions for me?
No comments:
Post a Comment