American Express interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

American Express
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
I started coding in my 3rd year with a course with Coding Ninjas. I started with DSA, then started competitive coding, and it helped in my coding rounds a lot. Coding Ninjas helped me in building my fundamentals strong.
Application story
It was an off-campus opportunity, I applied through referral. Then I get the coding round link which is followed by 2 interviews.
Why selected/rejected for the role?
I was rejected because I was unable to come to a solution to the question in the final round. And, when I went to check the solution, I saw it in the previously asked questions of American Express. If I had seen the coding ninjas' suggested questions for this company I would have been able to crack it.
Preparation
Duration: 12 months
Topics: Graphs, Trees, Dynamic Programming, Recursion, DSA
Tip
Tip

Tip 1: Try to learn the fundamentals first.
Tip 2: Give as many contests as you can, It will help you in coding rounds.
Tip 3: Practice as much as you can.

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1: Make it one-pager 
Tip 2: Mention things that are related to the job profile only

Interview rounds

01
Round
Medium
Online Coding Test
Duration60 minutes
Interview date10 Nov 2022
Coding problem2

It was a normal coding round, where I had to solve 2 questions in 60 minutes.

1. Segregate Even And Odd Nodes In a Linked List

Easy
15m average time
85% success
0/40
Asked in companies
OlaDunzoExpedia Group

You are given the head node of a singly linked list 'head'. Your task is to modify the linked list in such a way that all the even valued nodes appear before the all odd valued node and order of nodes remain the same.


Example :-
The given singly linked list is  6 -> 5 -> 3 -> 4 -> 7 -> 1 -> 2 

subsequence

The modified linked list should have all even values in starting and odd values in the end.
Problem approach

I did it by simply dividing linked list in two parts and then finally merging it.

Try solving now

2. LCA Of Binary Tree

Moderate
10m average time
90% success
0/80
Asked in companies
GrabDisney + HotstarShareChat

You have been given a Binary Tree of distinct integers and two nodes ‘X’ and ‘Y’. You are supposed to return the LCA (Lowest Common Ancestor) of ‘X’ and ‘Y’.


The LCA of ‘X’ and ‘Y’ in the binary tree is the shared ancestor of ‘X’ and ‘Y’ that is located farthest from the root.


Note :
You may assume that given ‘X’ and ‘Y’ definitely exist in the given binary tree.
For example :
For the given binary tree

Example

LCA of ‘X’ and ‘Y’ is highlighted in yellow colour.
Problem approach

If the left subtree height is greater, then the result is whatever is returned by the left as it has the highest depth elements.
Similarly, if the right subtree height is greater, then the result is whatever is returned by the right as it has the highest depth elements.
If the heights of both left and right subtrees are equal then the current node is the common ancestor of the deepest leaves.

Try solving now
02
Round
Medium
Video Call
Duration70 minutes
Interview date30 Nov 2022
Coding problem1

First, they started with an introduction. Then they asked me about my current company and my projects. He also asked about some computer fundamentals. We discussed a lot about that, and then he gave me a coding question and asked me to solve it with the best approach.

1. Check If One String Is A Rotation Of Another String

Moderate
15m average time
85% success
0/80
Asked in companies
OracleAmazonAmerican Express

You are given two Strings 'P' and 'Q' of equal length.


Your task is to return 1 if String 'P' can be converted into String 'Q' by cyclically rotating it to the right any number of times ( Possibly Zero ), else return 0.


A cyclic rotation to the right on String 'A' consists of taking String 'A' and moving the rightmost character to the leftmost position. For example, if 'A' = "pqrst", then it will be "tpqrs" after one cyclic rotation on 'A'.


For example:
Consider the two strings 'P' = "abfyg" and 'Q' = "gabfy" 

If we cyclically rotate String 'P' to the right once. The resulting string P becomes "gabfy" which is equal to String 'Q'. 

Therefore it is possible to convert String 'P' to String 'Q'.
Problem approach

It was a straightforward question, and you just have to rotate the string 1 2 times clockwise & anticlockwise and check if, in any case, it is equal to the second string.

Try solving now
03
Round
Hard
Video Call
Duration45 minutes
Interview date7 Dec 2022
Coding problem1

In this round, he asked me a lot about my projects, SQL, computer fundamentals, current job, and role. Then after discussing all this, he gave me one coding question at the end.

1. Detect Cycle in a Directed Graph

Moderate
25m average time
65% success
0/80
Asked in companies
AmazonAmerican ExpressOYO

Given a directed graph, check whether the graph contains a cycle or not. Your function should return true if the given graph contains at least one cycle, else return false.

Problem approach

It's a simple DFS question, and we just need to do DFS and check if we are visiting the same node again; if yes, then there's a cycle.

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 7 problems
Interviewed by American Express
4234 views
0 comments
0 upvotes
company logo
SDE - 1
5 rounds | 8 problems
Interviewed by American Express
1248 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by American Express
2542 views
1 comments
0 upvotes
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by American Express
64 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58238 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes