Panda Guru LogoPanda
Guru

Amazon India | SDE-1

Round 1 (Online Assessment)

Questions:

  1. Find the maximum level sum of a tree. Basically find the sum of each level of a binary tree and return the max sum.
  2. An array question involving sorting and two pointers (it was easy).
Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Round 2 (DSA)

Questions:

  1. Introduce yourself, where you work, etc.
  2. Find the largest subarray with sum 0.
  3. Course Schedule II - Instead of courses, it was software packages. Discuss time and space complexity of everything.
Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Round 3 (LP + LLD)

Questions:

  1. Introduce yourself and discuss Amazon Leadership Principles (LP).
  2. Design a data structure to store historical search terms and their frequency. When a user inputs a new search text (search_input), return the top K most frequent search terms that have the same prefix as search_input. Update the search terms and their frequency accordingly.
Candidate's Approach
  • Used Trie to get the prefix terms.
  • Explained a brute force approach using a hashmap and heap to get top K.
  • Optimized approach: Store the frequency map of search terms under the current Trie Node in every node of the prefix Trie. Querying retrieves the top K from the map using a heap.
Interviewer's Feedback

The interviewer mentioned that the code structure was good and that this round wasn't focused on DSA but rather on how the candidate writes code.


Round 4 (LP + DSA)

Questions:

  1. Introduce yourself and discuss your college projects.

  2. Java-related questions:

    • What is static used for?
    • Can methods be static?
    • Can properties (class variables) be static?
    • Can classes be static?
    • What’s the default value of variables inside a method if you don’t initialize?
    • What’s the default value of properties?
    • What’s the need of a constructor?
    • How to run some code before the constructor?
  3. Recursion question:

    • Say you have V units of money. If you give it to the bank, they’ll give you back V/2, V/3, V/4 units of money in exchange. Find the maximum amount of money you can get.
    • Example:
      Input: 12 Output: 13 Explanation: 12 -> 6, 4, 3 -> 13.
Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Compensation

Current Experience: 2 months internship + 2.5 months of experience at CHWTIA.

Notice period is just 30 days due to probation.