Search This Blog

Friday 27 February 2015

Amazon interview experience of a student of DA-IICT




Round 1: (MCQ’s and 2 coding questions)

An online test was conducted consisting of 20 MCQ’s and 2 coding questions. MCQ’s consisted of data structures, OS and DBMS concepts. They were quite easy. 2 coding questions were:
  1. Given a linked list where every node represents a head of another linked list and contains two pointers of its type (all linked list are sorted). First, Pointer to next node in the main list and Second, Pointer to a linked list where this node is head.Write flatten function to flatten the lists into a single sorted linked list.
  2. Print vertical sum of all the axis in the given binary tree.

Round 2: (F2F Interview)

Given number N<10^7  and 0=<K<=9  (a digit).Find the total number of occurrences of K from 1 to N. Example N=11 and K=1 then ans=4. I was asked to write the code.I solved it in complexity of O(number of digits in N) using DP.

Round 3: (F2F Interview)

  1. Given a binary tree to be passed through a network. How to pass this tree in minimum space.It was an open ended question and he asked me for many solutions and finally asked me to write the code.
  2. Given two sorted list, find the Kth largest element from the combined sorted list.

Round 4: (F2F Interview)

  1. Given array of integers, find 1st non repeating element and write code.
  2. He asked me some Operating system question- what is difference between malloc and declaring an array, what is memory leak, garbage collection, main difference between C and C++ related to Memory allocation. There were some more, I am not able to recall all of them.
  3. Given N, find total number of Zeros at the end of N!. (of course with proof).
  4. Given a linked list with every node containing two pointers next and random. next points to next element and random points to any random element in linked list. Create a copy of this list. He asked me to write the code.

Round 5: (F2F Interview with manager)

  1. Discussion about only one of my projects. More than technicality of project he concentrated on my role in project, Teamwork, idea etc.
  2. OS concepts like difference between threads and process.
  3. Given that main memory is very cheap,what is need of virtual memory.
  4. Cryptography concepts like what is difference between hashing data and encrypting data. What are different types of encryption schemes.
  5. Given a binary tree and a SUM, print all the path from root whose sum = SUM.
  6. He asked me the same question-: Given a binary tree to be passed through a network. How to pass this tree in minimum space. So, he just asked me discuss the approach.
  7. Given a sorted array (elements may or may not repeat) and number Find the starting and ending index of X in array. if X is not present in array return -1,-1. He asked me to write code.
All F2F round took around 1 hr and 15 mins.
Finally after a long long wait of 7 hours I was hired along with my 3 colleagues ...!!!

No comments:

Post a Comment

Blog Archive