Open In App

Amazon Interview Experience | Set 308 (On-Campus for Internship)

Last Updated : 28 Jun, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

Online Round (1 hr 30 min): 20 MCQs and 2 coding questions

MCQs : There were 20 MCQs based on DS, OS, IQ and output questions.
Coding questions:

  1. Given an expression containing alphanumeric characters and parenthesis, check if “(” and “)” are balanced. Parenthesis Checker
  2. The preorder and the inorder traversals of a binary tree are given.Convert this to a tree where each node contains the sum of the left and right sub trees in the original tree. The values of leaf nodes are changed to 0. Print the preorder and theinorder traversals of the modified tree. Transform to Sum Tree

Technical Round 1 (around 1 hr)

  1. 1. The interviewer asked me about my project, mainly the database part.
  2. Given a rectangular matrix and n moves. If you are at a position (x,y) , you can move to (x+1,y) , (x-1,y), (x,y+1), (x,y-1). What is the probability that after n moves ,you will remain inside the rectangle?
  3. Sum equals to Sum

Technical Round 2 (around 1 hr)

  1. The interviewer asked me what data structures I know. Then he asked me the applications of graph.
  2. Suppose there is a social networking site like Facebook. Every user gets some friend recommendations (i.e. People you may know!). Now, if there is a user A and he has 100 friends and each of his friends has got 5 other friends,A can get these 500 recommendations. But the condition is that he should only get the top 10 recommendations with whom he has the maximum number of mutual friends(If A and B are friends and B and C are friends, then A and C have a mutual friend, B). Suggest an efficient data structure for this and how to implement it. The implementation should be flexible as at any moment, any user can make new friends and he may also unfriend someone!
  3. Applications of heap. Insertion in a heap ( insertion of strings in a heap, priority is decided lexicographically). Time complexity of insertion.

Thanks GeeksforGeeks 🙂


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads