I applied off campus for the role of Software Development Engineer at Amazon, Hyderabad.
Round 1 (Telephonic) : 1 hour
Interview began with my intro and briefing of my work at current company.Then he asked me two coding questions :
- Ques 1 : You are given an array of size n. Now print the number of distinct elements in the array for every frame of size k.
- Ques 2 : A binary tree and a number, say k are given. Print every path in the tree with sum of the nodes in the path as k. (A path can start from any node and end at any node, i.e. they need not be root node and leaf node; and negative numbers can also be there in the tree)
- Ques 1 : A binary tree is given.You need to print every path in the tree starting from root with sum of the nodes of an path equal to a given number, k.(Numbers can be negative too)
- Ques 2 : A linked list is given in which every node has two pointers, one to its next node and the other one, random pointer, pointing to some other node in the linked list.You have to clone the given linked list. Sol : Clone a linked list with next and random pointer
- Ques 1 : A browser is being designed and you have to implement the history feature in that, which will have two functions, one is to fetch recent 100 urls ( getHistory() ), and other one to update that recent 100 urls list whenever a url is hit ( updateHistory() ).
- Ques 2 : An array is given and it can be of four types : (a). increasing (b). decreasing (c). first increasing then decreasing (d). first decreasing then increasing Without traversing the array we need to tell its type.There was a long discussion on this question.
-
Interview started with the introductions of me and the interviewer.
Then, he scanned my resume and started asking me about the projects I mentioned. Then he told me to select any of the projects and explain everything from scratch including my role, number of persons involved in the project and the role of each person. He also asked me the title of research paper I used to implement the project but I didn't remember the title so he asked me name of any one author who was part of the research paper. I told him a name and he searched for the paper on his laptop there only.Discussion on the project was approx 45 minutes long.
- After discussing the project in detail, he gave me a coding question and we discussed that question also for approx 45 minutes. Question - There is a number given in the form of a string.Number can be any long.Now I have to tell just greater number of the given number which is a palindrome also. Sol : Given a number, find the next smallest palindrome