Hi everyone. Following is my experience of the recent Amazon recruit drive:
Aptitude Round: (1:30 hours)
MCQs on outputs, maths, algorithms, DBMS, OS.
2 Coding questions: ( on hackerRank)
- Given 2 strings, check if any one of them has any anagram of the other string, as a substring of it.
- Graph question : ( not mentioned directly as graph, but was implied). basically Needed to find the shortest path between two given vertices in the graph.
Tip: It is important that one should attempt both sections decently.
- On a number line from negative infinite to positive infinite, if you start from 0, you can either jump back or front. but every jump length is 1 more than the previous jump. Given a number on the number line, can we reach it using any combination of jumps. If yes, print the minimum length path.
- Boolean Matrix Problem
- Row with max 1s
- You have n slabs with two dimensions. Stack them to get max height. No rotation of dimensions required. First he started with 2 dimensions, then 3, 4 and then for n dimensions.
- Given a binary tree, a target node in the binary tree, and an integer value k, delete all the nodes that are at distance k from the given target node. No parent pointers are available.
- An array of 0s and 1s is given. A sequence is given as f(1)=1,f(2)=2, f(n)=f(n-1)^2 – f(n-2)^2.
Print 0s and 1s alternatively according to the given sequence.
- Implement the power function in log n complexity.
- Intersection of two arrays
- Given a stream of As and Bs, print 1 when no of As is odd and no of Bs is even. I just had to draw the DFA for it.
- An SQL query.
- Given an array and a window k, print the minimum in every window of k. After suggesting a few data structures like dequeue, heap, bst, he told me to code it using bst.
- A file system is given. All the subdirectories in the root directory, the subdirectories within subdirectories and so on is given. The input is some file or subdirectory paths for which we need permission. Find the minimum permissions required to get all the permissions. No file for which permission is not asked should be given permission to.
- The interviewers are really very helpful and they keep on giving hints if you are stuck. Just let them continuously know your thought process. It is not necessary that you speak continuously but let them know what you think in intervals.
- They might ask you to think of better complexities and different data structures to solve the same problem. But its not that if you straight away land up in an optimized solution its bad for you because I was asked sometimes to compromise on the complexity but think of other data structures to solve it.
- While coding take your time. Make sure you cover the corner cases and if it is taking long, let your interviewer know what you are doing currently. Test it before finally approving it. If it fails, don’t worry, tell your interviewer about it and think of a fix or an alternative
Finally, a big big thanks to GeeksForGeeks for being a wonderful resource.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
- Amazon Interview Experience SDE1
- Amazon Interview Experience | Set 281 (for SDE1)
- Amazon Interview Experience SDE1
- Amazon Interview Experience | Set 262 (For SDE1)
- Amazon Interview Experience | Set 185 (For SDE1)
- Amazon Interview Experience | Set 261 (For SDE1)
- Amazon Interview Experience | Set 186 (For SDE1)
- Amazon Interview Experience | Set 187 (For SDE1)
- Amazon interview Experience | Set 141 (For SDE1)
- Amazon Interview Experience | Set 258 (For SDE1)
- Amazon Interview Experience | 198 (For SDE1)
- Amazon Interview Experience | Set 153 (For SDE1)
- Amazon Interview Experience | Set 188 (For SDE1)
- Amazon Interview Experience | Set 254 (Off-Campus for SDE1)
- Amazon Interview Experience | Set 184 (Off Campus for SDE1)