I was asked 2 coding questions based on trees. One was zigzag traversal of a binary tree . It was followed by that of a n-ary tree. The interviewer was very friendly. He also asked me questions regarding vectors and their implementation.
Interview questions [1]
Question 1
I was asked 2 coding questions based on trees. One was zigzag traversal of a binary tree . It was followed by that of a n-ary tree.
I applied through college or university. I interviewed at Amazon in Aug 2021
Interview
The interviewer was very chill and there was only one round. The exam prior to that had 4 parts - debugging(easy), coding(lucky because people had different questions and brute force works most of the time), personality and work ethics (kinda) and logic (easy).
Interview questions [1]
Question 1
Code for finding if two trees are identical and get the binary tree given inorder and preorder traversals. Prove unique tree exists if given inorder and either of preorder and postorder. Time and space complexitites of the code written.
I applied through college or university. I interviewed at Amazon (Kharagpur, West Bengal) in Aug 2021
Interview
A coding round will be held consisting of four sections and some students will be shortlisted. Then the shortlisted students will be giving the technical interview in a one-to-one which on clearing offer will be provided.
Interview questions [1]
Question 1
Asked to divide the given array into three disjoint subsets of equal sum and to print the elements in each subset