Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Amazon interview experience | Set 397 (On-Campus)

  • Difficulty Level : Hard
  • Last Updated : 11 Jul, 2019

Online Round:

It consisted of 20 mcqs and 2 coding questions. The test was hosted on HackerEarth.

  1. Given a string. Find all the palindromic partitions of the string. (Number of way the string can be partitioned so that all the partitions are palindrome)

   Input: NITIN     Output: 3

2. You are given with a large paragraph and N words.You have to find a min length subparagraph of the paragraph which contain all those N words in any order.

Round 1 (35-mins):

The interviewer started with the most common questions “Tell me about yourself” , in which I explained my projects , my achievements and my strengths. I was asked 2 questions from ds and algo in this round.

  1. Find all the hero and super hero in an array. Hero – Elements which are greater than all the elements on its right side. Super Hero – Elements which are greater than all the elements on its left and right side (Largest Element of the array which should only occur once). Expected Complexity – O(1) space and O(n) time in single traversal.

Input: {1,6,5,4,7,8,4,3,2,1}
Output:  Heroes : 8 4 3 2 1
Super Heroes : 8  

2. Smallest window in a string containing all the characters of another string

Round 2 (60-mins):

I was asked to introduce myself asked about my strengths and my weakness. Like last round I was asked 2 questions on data structures and algorithms.

Discussions on projects for 15-20 minutes.

  1. Find Maximum number possible by doing at-most K adjacent swaps. Expected Time Complexity – n*K and space complexity – O(1)

  2. Find the closest pair to a given sum in an unsorted array. Approaches – Brute force, Sorting , Ceil and floor using BST.

  3. Memory Allocation in C++. How to allocate double memory in c++. Couldn’t Explain this.

Was called for 3rd round after 5 mins.

Round 3 (90-mins):

This round was purely on algorithm design and data structures.

  1. Special stack

Couldn’t derive this for O(1) space.

2. Check for Balanced Tree

3. Minimum number of jumps to reach end

Explained O(n^2) dp approach. Gave a segment tree approach of time complexity O(nlogn) , space O(nlogn).

4. First non-repeating character in a stream

Implemented using Double Linked List and Hashmap.

Was called for the final round after 5 mins.

Round 4 (30-mins):

The round started with discussions on Operating Systems and Compiler Design.

Operating System Questions-

  1. What is caching ?

  2. Where does cache lie in operating system ?

  3. Difference between associative mapping and direct mapping in cache.

  4. What is spooling ?

  5. Applications of spooling.

Compiler Design Questions –

  1. What is lexical analysis ?

  2. What is semantic analysis ?

  3. What is a Deterministic Finite Automata (DFA) ?

  4. Difference between DFA and NFA ?

Exhaustive discussion on my current projects.

Finally 3 questions were asked on data structures and algorithms.

  1. Minimum time required to rot all oranges


  3. Bottom View of Binary Tree

Verdict : Selected 🙂

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!