American Express Coding Interview Questions: OA, Technical Interview & Managerial Round
American Express runs a large technology center in India out of Gurugram and Bengaluru, and hires freshers for Software Engineer, Graduate Engineer Trainee, and Analyst roles through campus and off campus drives. The technical track leans heavily on DSA fundamentals through a Codility based online assessment, while interviewers are also known for classic logic puzzles and business estimation questions.
This guide is organized by interview stage, online assessment, technical interview, and managerial round, based on questions actually reported by candidates. Every coding problem includes the exact question, a worked example, the right approach, and time or space complexity, and puzzle questions include the reasoning behind the answer.
American Express's Hiring Process for Fresher Roles
1. Application and Eligibility
- B.E./B.Tech, M.E./M.Tech, or MCA. CGPA cutoffs vary by drive, with 7.0 reported in some cycles and branch agnostic hiring in others.
- Tech roles target Software Engineer and Graduate Engineer Trainee positions. Analyst and Data Science roles follow a separate, more MCQ and case study heavy track.
2. Online Assessment (Codility) 90 minutes
- Three coding problems, easy to medium hard depending on the drive, with around 80 percent of test cases hidden.
- Analyst track candidates instead take an MCQ heavy test on Unstop covering numerical ability, logical reasoning, data interpretation, and some coding.
3. Technical Interview Round 1
- DSA problems, core CS fundamentals, and a detailed walkthrough of your resume and projects. Interviewers are reported to probe design choices and trade-offs rather than just what you built.
4. Technical Interview Round 2
- Deeper DSA, low level design, OOPs, DBMS, and operating systems, sometimes with live coding.
5. HR or Managerial Round
- Behavioural and situational questions, including "why American Express," leadership scenarios, and sometimes a business thinking question. Some drives skip a separate HR round and end with an in person managerial round instead.
Preparation Resources
Part 1 American Express Online Assessment (OA) Questions
The OA runs on Codility, 90 minutes, three coding problems with mostly hidden test cases. Problems range from easy to medium hard.
1. Maximum Subarray Sum Easy
Given an array of integers, find the contiguous subarray with the largest sum and return that sum.
Input: nums = [-2,1,-3,4,-1,2,1,-5,4]
Output: 6
Why: the subarray [4,-1,2,1] has the largest sum
Approach: Use Kadane's algorithm. Track the best sum ending at the current index, either extending the previous subarray or starting fresh at the current element, whichever is larger.
Complexity: Time O(n) · Space O(1)
Follow-up: How would you also return the actual subarray, not just the sum?
2. Minimum Cost Climbing Stairs Medium
Given a set of stepping stones or stairs each with a cost, and a frog or climber that can jump one or two steps at a time, find the minimum total cost to reach the end.
Input: cost = [1, 100, 1, 1, 1, 100, 1, 1, 100, 1]
Output: 6
Approach: Build a DP array where each position holds the minimum cost to reach it, computed from the minimum of the previous one or two positions plus the current cost.
Complexity: Time O(n) · Space O(n), reducible to O(1) with two variables
Follow-up: How would this change if the climber could jump up to k steps at a time?
3. Find Duplicate Elements in an Array Easy
Given an array of integers, return all elements that appear more than once.
Input: arr = [4, 3, 2, 7, 8, 2, 3, 1]
Output: [2, 3]
Approach: Use a hash set to track elements seen so far. When an element already exists in the set, add it to a second set of duplicates to avoid reporting it more than once.
Complexity: Time O(n) · Space O(n)
Follow-up: How would you solve this in place with O(1) extra space if the array values are bounded between 1 and n?
4. Maximum Sum Placing Two Non-Attacking Rooks Medium
Given a chessboard where each cell has a value, place two rooks such that they do not attack each other, meaning they cannot share a row or column, and the sum of their cell values is maximized.
Input: a 3x3 grid of cell values
Output: the maximum achievable sum from two non-attacking placements
Approach: For each row, find the highest value cell. Then for every pair of rows, combine their best values as long as the two chosen cells fall in different columns, adjusting to the second best value in a row if the top choices collide on the same column.
Complexity: Time O(n^2) for an n by n board · Space O(n)
Follow-up: How would your approach change for three non-attacking rooks instead of two?
5. Find Missing Numbers Given the Average Medium
Given a list with some numbers replaced by a placeholder and the known average of the full original list, find the values of the missing numbers.
Input: arr = [10, -1, 30, -1], average = 20
Output: the two missing values that make the average exactly 20
Approach: Use the known average to compute the required total sum, subtract the sum of the known elements, and distribute the remaining sum across the missing slots based on any additional constraints given in the problem.
Complexity: Time O(n) · Space O(1)
Follow-up: What would you do if there were multiple valid answers and the problem asked for the lexicographically smallest one?
6. Cleaning Robot Grid Simulation Medium
A cleaning robot starts at a cell on an N by M grid facing a direction. It moves forward, cleaning each cell it visits, and rotates clockwise whenever it hits an obstacle or the edge of the grid. Count how many distinct cells it cleans before stopping.
Input: a grid with obstacles marked, a starting cell, and a starting direction
Output: the count of distinct cells cleaned
Approach: Simulate the robot step by step. Track visited cells in a set. When the next cell in the current direction is blocked or out of bounds, rotate the direction clockwise instead of moving. Decide a stopping condition, such as returning to a previously visited state of position and direction.
Complexity: Time O(N*M) in the typical case · Space O(N*M) for the visited set
Follow-up: How would you detect and terminate an infinite loop if the robot revisits the same position and direction combination?
Part 2 American Express Technical Interview Questions
The technical rounds combine DSA coding with core CS fundamentals and a deep dive into your resume and projects.
7. Detect a Cycle in a Linked List Easy
Given the head of a linked list, determine whether it contains a cycle.
Input: head with a cycle back to an earlier node
Output: true
Approach: Use Floyd's cycle detection with a slow pointer moving one step and a fast pointer moving two steps. If they ever meet, a cycle exists.
Complexity: Time O(n) · Space O(1)
Follow-up: How would you find the node where the cycle begins?
8. Find the Merge Point of Two Linked Lists Easy
Given the heads of two singly linked lists of possibly different lengths that eventually merge into one list, find the node where they merge.
Input: two lists that share a common tail starting at a given node
Output: the shared node
Approach: Find the length difference between the two lists, advance the pointer on the longer list by that difference, then move both pointers forward one step at a time until they point to the same node.
Complexity: Time O(m + n) · Space O(1)
Follow-up: How would you solve this without knowing either list's length in advance?
9. Implement a Queue Using an Array Easy
Implement a first in first out queue backed by a fixed size array, supporting enqueue, dequeue, and checking if the queue is full or empty.
Input: enqueue(1), enqueue(2), dequeue(), enqueue(3)
Output: front is now 2, with 3 at the back
Approach: Use a circular array with front and rear indices that wrap around using modulo arithmetic, so space freed at the front can be reused without shifting elements.
Complexity: Time O(1) per operation · Space O(capacity)
Follow-up: How would you resize the queue dynamically once it fills up?
10. Check if One Tree is a Subtree of Another Medium
Given two binary trees, determine whether the second tree exists as an exact subtree within the first tree.
Input: root = [3,4,5,1,2], subRoot = [4,1,2]
Output: true
Approach: For every node in the main tree, check whether the subtree rooted there is structurally identical to the target tree using a recursive comparison, and recurse this check across the whole main tree.
Complexity: Time O(m*n) in the worst case · Space O(h) for recursion depth
Follow-up: How would you optimize this using tree serialization and string matching?
11. Lowest Common Ancestor of a Binary Tree Medium
Given a binary tree and two nodes, find their lowest common ancestor.
Input: root = [3,5,1,6,2,0,8], p = 5, q = 1
Output: 3
Approach: Recurse from the root. If the current node matches either target, return it. Otherwise recurse into both children, if both sides return a non null result, the current node is the ancestor, otherwise pass up whichever side found something.
Complexity: Time O(n) · Space O(h) for recursion depth
Follow-up: How would this change if the tree also had parent pointers available?
12. Sieve of Eratosthenes Easy
Given a number n, find all prime numbers up to n efficiently.
Input: n = 30
Output: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
Approach: Create a boolean array marking all numbers as prime initially. Starting from 2, mark every multiple of each prime as not prime, skipping numbers already marked, up to the square root of n for the outer loop.
Complexity: Time O(n log log n) · Space O(n)
Follow-up: How would you find primes in a range like 1 million to 2 million without allocating an array of size 2 million?
13. Find the Top K Elements With Limited Memory Medium
You are given a stream of 1000 elements but only have memory to hold 30 at a time. Find the top 100 elements overall.
Input: a large stream of numbers processed one at a time, memory limited to 30 slots
Output: the top 100 values seen across the whole stream
Approach: This is only possible if you can make multiple passes or accept an approximate answer, since holding the true top 100 needs at least 100 slots of memory. Discuss the trade-off explicitly with the interviewer: with only 30 slots you could maintain a min heap of size 30 to track a partial top set per pass, or clarify whether multiple passes over the stream are allowed to build up the full top 100 in batches.
Complexity: Depends on the clarified constraints, discussed as a design trade-off rather than a single fixed answer
Follow-up: How would your answer change if you were guaranteed enough memory for exactly the top 100 elements?
Part 3 American Express Managerial Round, Puzzles, and Estimation Questions
American Express interviewers are known for classic logic puzzles and business estimation questions, especially in later rounds and for analyst track candidates.
14. Optimal Merge Order for Three Sorted Lists Medium
Given three sorted lists of different sizes, decide the order in which to merge them pairwise to minimize the total cost, where merging two lists of size a and b costs a plus b.
Input: lists of size 200, 400, and 600
Output: the minimum total merge cost and the order that achieves it
Approach: This mirrors the optimal merge pattern used in Huffman coding. Always merge the two smallest available lists first, since larger lists should only be touched once, near the end.
Complexity: Time O(n log n) with a min heap for more than three lists · Space O(n)
Follow-up: How would you generalize this to merging k sorted lists?
15. Maximum Odd Decomposition of a Number Medium
Given a positive integer, break it into the maximum possible count of unique odd numbers that sum to it.
Input: n = 9
Output: [1, 3, 5]
Why: three unique odd numbers, the maximum possible count for 9
Approach: Greedily use the smallest unused odd numbers first, 1, 3, 5, 7, and so on, until adding the next one would exceed the target. If a remainder is left over, fold it into the last chosen number, adjusting only if that keeps the last number odd and unique. If it would break oddness or uniqueness, drop the last term and re-fold the remainder one step earlier instead.
Complexity: Time O(sqrt(n)) · Space O(sqrt(n)) for the output list
Follow-up: How would the approach change if the numbers had to be unique but could be even or odd?
16. Three Bulbs and Three Switches Easy
There are three switches outside a room and three bulbs inside. You can flip the switches as many times as you like, but can only enter the room once. How do you determine which switch controls which bulb?
Answer: Turn on the first switch and leave it on for a few minutes, then turn it off and turn on the second switch. Enter the room. The bulb that is on corresponds to the second switch. The bulb that is off but warm corresponds to the first switch. The bulb that is off and cold corresponds to the third switch.
Why it works: This uses a third signal beyond simple on and off, heat, to distinguish between the two switches you cannot directly observe as currently on.
17. Monkey Climbing a Tree Easy
A monkey climbs a 20 foot tree. Each day it climbs 3 feet, and each night it slips back 2 feet. How many days does it take to reach the top?
Answer: 18 days. The monkey gains a net 1 foot per day for the first 17 days, reaching 17 feet by the end of day 17. On day 18, it climbs the remaining 3 feet and reaches the top before it can slip back that night.
Why it works: The trap is applying simple net gain per day across the whole climb. Once the monkey can reach the top during the day's climb, it does not slip back, so you must check the final day separately.
18. Bee Between Two Approaching Trains Medium
Two trains start 100 km apart and move toward each other, each at 50 km/h. A bee starts at one train flying at 75 km/h toward the other, and bounces back and forth between the trains until they meet. How far does the bee travel in total?
Answer: 75 km. Instead of summing an infinite series of back and forth trips, calculate the total time until the trains meet, 1 hour since they close the 100 km gap at a combined 100 km/h, then multiply the bee's constant speed by that time.
Why it works: The trick is recognizing that total distance depends only on total flying time, not on tracking each individual leg of the bee's journey.
19. Ten Boxes, One With Different Weight Balls Medium
You have 10 boxes of balls, each ball normally weighing 10 grams, but one box has balls that all weigh 9 grams instead. You have a digital weighing scale and can use it only once. How do you find the odd box?
Answer: Take 1 ball from box 1, 2 balls from box 2, 3 balls from box 3, and so on up to 10 balls from box 10. Weigh all of them together. The difference between the expected total weight and the actual weight, in grams, tells you the number of the odd box.
Why it works: Taking a different, unique count of balls from each box means the shortfall in weight directly encodes which box's count contributed the missing grams.
20. Three People, Three Hats Medium
Three people each wear a hat of a color they cannot see, only the other two hats. Without communicating, each must deduce their own hat color through logical reasoning about what the others do or do not say.
Answer: The exact deduction depends on the specific version given, but the general approach is that if a person sees two hats of the same color, they can reason about the constraints implied by the puzzle's rules, such as a known total count of colors, to deduce their own. Silence or hesitation from another participant also becomes information, since a confident answer implies that person deduced something from what they saw.
Why it works: The core idea in this family of puzzles is that inaction or delay by others is itself a signal, and each person's reasoning builds on what they can infer about what everyone else must be seeing.
21. Estimate the Annual Sales Volume of a Packaged Snack in India Medium
Estimate how many 1 kg packets of a popular Indian packaged snack are sold annually across India.
Approach: Start with India's population, estimate the fraction that regularly buys packaged snacks, estimate an average consumption rate per buying household per month, convert to 1 kg packet equivalents, then multiply out to a yearly figure. State every assumption out loud as you go, the interviewer is evaluating your structured reasoning, not whether you know the real number.
Why it works: Guesstimates are scored on whether your breakdown is logical and your assumptions are reasonable and clearly stated, not on hitting the exact real world figure.
22. Explain the Four Pillars of Object Oriented Programming Easy
Explain encapsulation, abstraction, inheritance, and polymorphism, and give a concrete example of each from a project you have built.
Approach: Do not just define the terms. For each pillar, point to an actual class or design decision in your own project that demonstrates it, since interviewers explicitly probe whether you understand these concepts in practice, not just in theory.
Why it matters: Reported across multiple Amex interview accounts as one of the most consistently asked conceptual questions, often as a follow-up to whatever project you present first.
23. Design the Authentication Flow for a Web Application Hard
Explain how you would design an authentication flow using JWT, from a user logging in on the frontend through to how the backend validates subsequent requests.
Discussion points: how the login request is handled, how a token is issued and where it is
stored on the client, how the token is validated on each request, and how you would handle
token expiry and refresh.
Approach: Walk through the full request lifecycle. Cover credential validation, JWT issuance with an expiry, secure client side storage, how the token is attached to and verified on subsequent requests, and a refresh token strategy for handling expiry without forcing the user to log in again.
Why it matters: Reported specifically in Graduate Engineer Trainee interviews, testing whether you understand a concept you may have only used through a library, not built yourself.
Preparation Tips
- Practice explaining trade-offs, not just solutions. Amex interviewers are consistently reported probing why you made a specific design choice in your project, not just what the project does.
- Do not skip logic puzzles in your prep. Classic puzzles like the bulbs and switches or the weighing problem come up repeatedly across years and interviewers, and are quick wins if you have seen the pattern before.
- For the analyst or data science track, practice guesstimates explicitly. These are scored on structured reasoning, so practice narrating your assumptions out loud, not just landing on a number.
- Revise linked lists, trees, and hashing. These three categories cover the majority of reported DSA questions across both the OA and technical interview rounds.
Join our Telegram group to discuss more American Express interview questions and prep strategies!