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

SDE - 1

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

Interview preparation journey

expand-icon
Journey
My B.Tech journey at IGDTUW was a thrilling experience that began with an orientation day buzzing with excitement. As I navigated through classes, I discovered the fascinating world of coding.
Application story
This company visited my campus for placement. We needed to apply for this opportunity on their career portal.
Why selected/rejected for the role?
I was rejected because I could not answer the questions in the last round. I believe that particular question prevented me from clearing that round.
Preparation
Duration: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Practice regularly on coding platforms and websites. Consistent coding practice is crucial for improving your problem-solving skills and familiarity with various algorithms and data structures. Set aside dedicated time each day to solve coding challenges on platforms like Code Studio. This regular practice will enhance your coding proficiency and build your confidence.

Application process
Where: Campus
Eligibility: Above 7 CGPA, (Salary Package: 22 LPA)
Resume Tip
Resume tip

Tip 1: Include some projects on your resume.
Tip 2: Do not include false information on your resume.

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date12 Sep 2024
Coding problem2

1. Segregate Even And Odd Nodes In a Linked List

Easy
15m average time
85% success
0/40
Asked in companies
American ExpressOptumGrab

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 the linked list into 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
Duration60 minutes
Interview date13 Sep 2024
Coding problem2

1. Maximum In Sliding Windows Of Size K

Moderate
20m average time
80% success
0/80
Asked in companies
AppleWalmartOYO

Given an array/list of integers of length ‘N’, there is a sliding window of size ‘K’ which moves from the beginning of the array, to the very end. You can only see the ‘K’ numbers in a particular window at a time. For each of the 'N'-'K'+1 different windows thus formed, you are supposed to return the maximum element in each of them, from the given array/list.

Problem approach

Need to find the maximum element in a window of size k.

Try solving now

2. Minimum number of swaps required to sort an array

Easy
10m average time
90% success
0/40
Asked in companies
IBMHikeSamsung

You have been given an array 'ARR' of 'N' distinct elements.

Your task is to find the minimum no. of swaps required to sort the array.

For example:
For the given input array [4, 3, 2, 1], the minimum no. of swaps required to sort the array is 2, i.e. swap index 0 with 3 and 1 with 2 to form the sorted array [1, 2, 3, 4].
Problem approach

For the given input array [4, 3, 2, 1], the minimum no. of swaps required to sort the array is 2, i.e. swap index 0 with 3 and 1 with 2 to form the sorted array [1, 2, 3, 4].

Try solving now
03
Round
Easy
Video Call
Duration60 minutes
Interview date16 Sep 2024
Coding problem2

1. Left View Of Binary Tree

Moderate
30m average time
60% success
0/80
Asked in companies
SAP LabsZSThought Works

You have been given a Binary Tree of 'n' nodes, where the nodes have integer values



Example :
If the input tree is as depicted in the picture: 

alt text

The Left View of the tree will be:  2 35 2 
Problem approach

We need to print the left view of the binary tree.

Try solving now

2. Longest increasing subsequence

Moderate
0/80
Asked in companies
GrabAmazonSamsung

'N' students are standing in a row. You are given the height of every student standing in the row. Your task is to find the longest strictly increasing subsequence of heights from the row such that the relative order of the students does not change.

A subsequence is a sequence that can be derived from another sequence by deleting zero or more elements without changing the order of the remaining elements.
Problem approach

For a given array with N elements, you need to find the length of the longest subsequence from the array such that all the elements of the subsequence are sorted in strictly increasing order.
Strictly Increasing Sequence is when each term in the sequence is larger than the preceding term

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

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 7 problems
Interviewed by American Express
4130 views
0 comments
0 upvotes
company logo
SDE - 1
5 rounds | 8 problems
Interviewed by American Express
1217 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by American Express
2400 views
1 comments
0 upvotes
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by American Express
1518 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes