Amazon Intern interview Experience | 31 October 2026 | DSA + ML + GenAI
- Location
- IGDTUW, Delhi
- Posted
- 1 Nov 2026
Summary
I cleared the first round of Amazon's internship interview, which covered DSA, probability, ML and GenAI topics, and was subsequently invited to the next round.
How it went
Amazon Interview Experience | 31 October 2026 | DSA + ML + GenAI
Education: B.Tech in CSE (Tier-3 College)
Experience: Data Science Intern at an AI Startup
Online Assessment (OA)
Applied through the job portal and received the OA link on the same day.
The OA consisted of:
- 1 DSA question
- Code debugging
- Behavioural questions
After a month, I received an email inviting me to the hiring drive. I opted for offline interviews, as I had heard that candidates who chose online interviews were often rejected without being scheduled for further rounds.
Venue: IGDTUW, Delhi
Date: 31/10/2026
1st Round: 3 DSA Questions + Behavioural
The interviewer introduced himself and then asked me to give my introduction. After that, he handed me a pen and paper to solve the questions.
1. Find the maximum sum among the longest paths in a binary tree.
Similar to the basic path sum problem, but with an additional state to track the path length.
I took a minute to understand the question and then explained two possible approaches:
- Two-pass approach: First calculate the maximum path length and then find the maximum sum among paths of that length.
- Single-pass approach: Use DFS while maintaining both the sum and length as states.
The interviewer pointed out an edge case in my approach, which I corrected. He then asked me to write the code on paper, dry‑run it, and explain its time and space complexities.
2. Group all packages together using minimum swaps.
Similar to Minimum Swaps to Group All 1s Together II.
I had solved a similar problem before, so I started by explaining the brute‑force approach. I then mentioned that it would not be efficient for larger constraints and optimized it using a sliding window.
I wrote the optimized code, performed a dry run, and explained its time and space complexities.
3. LCA.
Pretty straight forward LCA question. I implemented the recursive solution. He asked me if I knew any optimizations on this, so I mentioned Binary Lifting. He asked if I could code it up, so I did. We did a few dry runs and everything worked.
Behavioural Questions
- Tell me about a time when you did something outside your comfort zone.
- Tell me about a time when someone criticized your decision. How did you react, and how did you handle the situation?
I answered both questions using the STAR method and incorporated relevant Amazon Leadership Principles.
Result: Cleared the first round! Just five minutes later, my second round was scheduled.
2nd Round: Probability Puzzle + DSA + ML + GenAI
Honestly, I went into the room expecting an HR round, but it turned out to be another technical interview.
1. Probability Puzzle
The interviewer introduced himself and asked me to introduce myself as well. He then presented a probability puzzle.
This was probably the only part of the interview where I struggled. I wasn't particularly prepared for probability‑based questions.
We discussed the problem for around five minutes. I was gradually approaching a solution, and the interviewer also helped me derive the final approach.
2. DSA: Currency Exchange Calculator
We had to implement a currency exchange calculator.
The input consisted of three fields:
[currency1, currency2, exchangeRate]
We were also given queries in the following format:
[currency1, currency2, amountInCurrency1]
I approached the problem using a graph, where each currency represented a node and the exchange rates represented weighted edges.
I suggested creating a directed graph and adding reverse edges with the inverse exchange rates to handle conversions in both directions.
The interviewer asked me to implement the solution, followed by a dry run.
I made a small mistake by initially assuming that the graph wouldn't contain cycles. As a follow‑up, he asked how I would handle cycles, so I incorporated a visited state to avoid revisiting nodes during traversal.
3. Machine Learning and Generative AI
The interviewer asked me about:
- Where I use LLMs and how they have helped me.
- How CNNs work and their underlying architecture.
- How Transformers work and their underlying architecture.
- The role of encoders and decoders in both CNNs and Transformers.
He also asked me to draw diagrams explaining the architectures of CNNs and Transformers.
Final Feedback
At the end of the interview, I asked the interviewer how I had performed and whether there were any areas I could improve.
His feedback was:
"You're a strong candidate. You should work on defending everything you have mentioned on your resume. Since you've mentioned that you've been working with Machine Learning, you should also have a good understanding of probability and statistics."
Looking for Feedback!
Overall, I think both rounds went reasonably well, although I could have performed better in the probability puzzle.
Anyone who has been selected for the Amazon internship role or has gone through a similar interview process, please let me know how you think I performed and whether there are any areas I should focus on improving.
Questions asked (4)
- 01
Maximum Sum Among Longest Paths in a Binary Tree
Data Structures & Algorithms
Find the maximum sum among the longest paths in a binary tree. This is similar to the basic path sum problem, but you must also track the path length. The solution can be approached via:
- A two‑pass method – first compute the maximum path length, then find the maximum sum among all paths of that length.
- A single‑pass DFS that maintains both sum and length as state. The candidate was asked to write code on paper, dry‑run it, and discuss time and space complexities.
- 02
Group All Packages Together Using Minimum Swaps
Data Structures & Algorithms
Open the problemGiven an array of integers, determine the minimum number of swaps required to group all elements (e.g., packages) together. This problem is analogous to LeetCode's "Minimum Swaps to Group All 1s Together II". The candidate discussed a brute‑force solution and then optimized it using a sliding window technique.
- 03
Lowest Common Ancestor (LCA)
Data Structures & Algorithms
Implement a solution for the Lowest Common Ancestor problem in a binary tree. The candidate provided a recursive solution and discussed possible optimizations such as Binary Lifting.
- 04
Currency Exchange Calculator
Data Structures & Algorithms
Implement a currency exchange calculator. Input consists of exchange rates as triples
[currency1, currency2, exchangeRate]. Queries are of the form[currency1, currency2, amountInCurrency1]. The solution should handle conversions in both directions and correctly process cycles in the graph of currencies.