Questions asked in Amazon Interview.
Round 2: Written
1. Find the SQRT of a number.
2. Simulate Reversed level order traversal.
1. Given a binary tree, no two adjacent nodes have same color, but all leaves should be in same color. You can fill only with two colors. Write a function to find whether a given tree can be colored using above scenario.
2. Given a binary tree, change the right pointer of every leaf node to the next leaf node (right to it but may be on different level).
3. Given a class with n people,where each people plays a game with all other people. Results are with you. You have to arrange them in a queue with a condition that, a[i] should have won a[i-1], for all I, you don’t need to care about a[i-2] . (a[i] may win or lose a[i-2]).
1. Write prime numbers from 1 to 100000.
2. Another simple question from tree. can’t remember 🙁
3. Question from probability. Given c containers, r red balls, g green balls. Give a condition that if a guy randomly pick a ball from any of the containers, it should be red.(more probable)
1. Reverse a linked list iteratively, recursively.(Ice breaking question :P)
2. Given a matrix with 1s and 0s, u have to construct a matrix such that a[i][j]=1, if only every element in ith row and jth column is 1, otherwise 0. You have to use constant space and O(mn) time complexity.
3. Maze solve problem. Given a matrix with 1s and 0s, 0 represents free path, 1 represents blocked area, and you can move in any of the 8 directions. Find the path from source to destination and print it. Then he told me that he can change destination at run time. And asked me to do for that.
This article is contributed by Karthick Raja R. If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
- ServiceNow Interview Experience Oncampus
- MathWorks Interview Experience (EDG, Oncampus)
- UHG Interview Experience | OnCampus- 2019
- InfoEdge Interview Experience | OnCampus-2019
- Amazon Interview Experience SDE-1 | Amazon-WOW 2020
- Amazon SDE-1 Interview Experience | Amazon WOW-2020
- Amazon Interview Experience (Telephonic Interview)
- Amazon Interview Experience | Set 249 (Telephonic Interview)
- Amazon Interview Experience | Set 180 (Telephonic Interview )
- Amazon Interview -SDE 1 Interview Experience
- Amazon Interview | Set 71 (For SDE-2)
- Amazon Interview | Set 69 (For SDE-1)
- Amazon Interview | Set 68 (For SDE-1)
- Amazon Interview | Set 67 (For SDE-1)
- Amazon Interview | Set 66 (For SDE)
- Amazon Interview | Set 20
- Amazon Interview | Set 21
- Amazon Interview | Set 63 (For SDE-1)
- Amazon Interview | Set 62 (For SDE-1)
- Amazon Interview | Set 22