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

SDE - 1

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

Interview preparation journey

expand-icon
Preparation
Duration: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Do practice a lot of data structures questions as mostly questions in interviews are based on them. Also, do prepare for projects mentioned in your resume and skills which you have mentioned. clear.
Tip 2 : Coding ninjas has a big hand in making my interview clear as I have taken a course from the coding Ninjas which helped me a lot to make my concepts

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

Tip 1 : Keep it short and crisp. 
Tip 2 : Go through it properly before the interview. Make sure that you haven't put anything in it that can cause you problems during the interview.

Interview rounds

01
Round
Hard
Face to Face
Duration30 minutes
Interview date16 Aug 2022
Coding problem4

1. Minimum Operations

Easy
20m average time
82% success
0/40
Asked in companies
BNY MellonLinkedInThought Works

You are given an array 'ARR' of 'N' positive integers. You need to find the minimum number of operations needed to make all elements of the array equal. You can perform addition, multiplication, subtraction or division with any element on an array element.

Addition, Subtraction, Multiplication or Division on any element of the array will be considered as a single operation.

Example:

If the given array is [1,2,3] then the answer would be 2. One of the ways to make all the elements of the given array equal is by adding 1 to the array element with value 1 and subtracting 1 from the array element with value 3. So that final array would become [2,2,2]. 
Try solving now

2. Longest Consecutive Sequence

Moderate
40m average time
70% success
0/80
Asked in companies
WalmartOptumAmazon

You are given an unsorted array/list 'ARR' of 'N' integers. Your task is to return the length of the longest consecutive sequence.

The consecutive sequence is in the form ['NUM', 'NUM' + 1, 'NUM' + 2, ..., 'NUM' + L] where 'NUM' is the starting integer of the sequence and 'L' + 1 is the length of the sequence.

Note:

If there are any duplicates in the given array we will count only one of them in the consecutive sequence.
For example-
For the given 'ARR' [9,5,4,9,10,10,6].

Output = 3
The longest consecutive sequence is [4,5,6].
Follow Up:
Can you solve this in O(N) time and O(N) space complexity?
Try solving now

3. Avoiding Traps

Moderate
25m average time
60% success
0/80
Asked in companies
Deutsche BankAmerican ExpressMicrosoft

Given an array of 'N' elements 'OBSTACLES', where each element represents the coordinate of the obstacle on a straight line. We start jumping from point 0 and we need to reach the end of the line avoiding all the obstacles which are present on the line. The length of every jump should be the same. For example, if we jump from 0 to 3, the jump is of 3 units hence the next jump should also be of 3 units that is from 3 to 6 and so on.

Find the minimum length of the jump so that we can reach the end of the line avoiding all obstacles.

Note:
1.The end will be a minimum possible coordinate, greater than the maximum element in the given array of elements.

2.Avoiding obstacles means that we cannot stop at the given coordinates.

3.The elements may not be in sorted order.

4.The last jump can be of any unit, provided it crosses the endpoint.
Problem approach

s1- I first made an array in the main function that will contain the number of prime numbers less than or equal to the index value of the array and passed into my called function. 
s2- This will give me the a value for each test case. Then, int the called function I applied dynamic programming. I created a dp array and initialized all values to max integer (dp[0] = 0). 
s3- For each index i, i put dp[i+1] if (i=(r1/r2)) equal to minimum of(dp[i]+1, dp[i+1/i+2/i+a]). Then I returned dp[n-1] if it wasnt equal to max integer otherwise i returned "No way!".

Try solving now

4. Minimum Number Of Operations To Reach X.

Moderate
25m average time
60% success
0/80
Asked in companies
OYOAmerican ExpressIntuit

You have been given an array/list ‘ARR’ of integers consisting of ‘N’ integers. You are also given an integer ‘X’. In one operation, you can either remove the leftmost or the rightmost element and add that to the sum of removed elements so far. Your task is to return the minimum number of operations such that the sum of removed elements becomes exactly ‘X’. If it is not possible return -1.

For Example :
Let’s say you have an array/list [1, 3, 5, 3] and ‘X’ is 7. 
We can first remove the rightmost element i.e. 3. The array becomes [1,3,5]. In the next step, we can remove the leftmost element i.e 1. The array becomes [3,5] and the sum of removed elements so far becomes 4. In the next step, we can remove the leftmost element i.e 3. The array becomes [5] and the sum of removed elements so far is 7. We have reached our target X i.e 7. Therefore the minimum number of operations to reach ‘X’ is 3.
Problem approach

s1- first line of input contains a single integer 'T', representing the number of test cases.
s2- The first line of input contains an integer 'N' representing the length of the array.
s3- return an integer in a single line i.e. the minimum number of operations required to make all the elements of the array equal.

Try solving now
02
Round
Medium
Video Call
Duration30 Minutes
Interview date9 Aug 2022
Coding problem2

1. Reverse the String

Easy
15m average time
85% success
0/40
Asked in companies
SAP LabsWalmartFacebook

You are given a string 'STR'. The string contains [a-z] [A-Z] [0-9] [special characters]. You have to find the reverse of the string.

For example:

 If the given string is: STR = "abcde". You have to print the string "edcba".
follow up:
Try to solve the problem in O(1) space complexity. 
Problem approach

s1- He asked me to write a function to reverse a string of size n. In this question I defined my string ans="" , then iterated i from n-1 to 0 and concatenated Character.toString(s.charAt(i)) to my ans and then returned ans. He followed up the question. He said “If I remove ' ”="" ' in string ans line then what will happen. I answered that it will give me a compilation error that the variable "ans" is not initialized. 
s2- Then he asked what it means that a string is immutable.

Try solving now

2. OS Questions

What are semaphores?
What is virtual memory?

Problem approach

Tip 1 : Read Galvin for OS thoroughly.
Tip 2 : Do practice for SQL queries.

03
Round
Medium
HR Round
Duration10 minutes
Interview date12 Oct 2022
Coding problem1

1. Basic HR Questions

1. Tell me about yourself. 
2. Why are you interested in this position?
3. Why are you leaving your current job? 
4. Can you describe a work or school instance in which you messed up? 
5. Tell me about a time when you experienced conflict with a co-worker and how you dealt with it. ?

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
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 | 4 problems
Interviewed by American Express
1555 views
0 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