Amazon Interview Question
Software EngineersTeam: Seattle
Country: United States
Interview Type: Phone Interview
is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.
Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.
Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.
O(1) for inserting a node in a linked list. Just take a pointer to the beginning of the list, then prepend it. For appending, you'd need to keep a pointer to the end of the list in order to achieve O(1), otherwise you have to pay an O(n) search cost for the end of the list which you get by traversing the list 1 by 1.
- JC315 September 02, 2016~O(1) time complexity for the hash map. You pay the time for the hash (which, if designed correctly, is O(1) and then you append to the bucket in the hash map (technically O(k) where k is the expected number of elements in the bucket, but if you choose the right hash where there are no collisions this becomes O(1)).