Skip to content
Related Articles

Related Articles

Improve Article

Amazon off campus ( All India campus hiring ) SDE 1

  • Difficulty Level : Medium
  • Last Updated : 15 Jul, 2019

Online Coding Round: (hackerearth, 1.5 hr)
1)Good Ranges:
Input : N, M (M no of queries)
Constraints : 1<=X [1, 4] -> 1+4 -> 5
2 -> [1, 1][2, 4] -> 1+1+2+4 -> 8
3 -> [1, 1][2, 2][3, 4] -> 1+1+2+2+3+4 -> 13
4 -> [1, 1][2, 2][3, 3][4, 4] -> 1+1+2+2+3+3+4+4 -> 20
Link: https://ideone.com/jzuIOL

2)
A tree with N vertices and N-1 edges is given. The value of the nodes given in the array where the i’th element in array gives the value of the i’th node (here array index starts from 1). Relation between parent and child node is given. Q queries will be given in the format of L X. Find the node which lies at level L mod (Maxdepth + 1) and has value just greater than or equal to X. Answer to query is the smallest value of such node and if no answer print ‘-1’. (Maxdepth – Maximum depth of the tree)

20+ candidates were shortlisted. F2F interview happened.
Technical round 1:
1) Tell me about yourself
2) Majority candidate
3) Zig zag traversal
Technical round 2:
1) Remove duplicates from a sorted linked list
2) Merge k sorted arrays https://www.geeksforgeeks.org/merge-k-sorted-arrays/
3) Heap insertion, deletion and heapify
Technical round 3:
1) K th largest element in a tree.
2) LRU cache
3) Challenges faced in FYP.
Technical round 4:
1) Questions regarding projects I have done
2) Practical usage of stack and queue in computers (ex- stack -> recursion, queue -> process scheduling)
3) OS -> process, thread, difference b/w them.
4) DBMS -> normalization, De-normalisation, deadlock, deadlock avoidance.
Verdict : selected
Tips :
1) Should able to write code clearly on paper
2) Should cover all edge cases before submitting to them.

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon. GoogleE-Litmus and Microsoft Test Serieses.

My Personal Notes arrow_drop_up
Recommended Articles
Page :