Amazon Interview Experience for SDE-2

1st Round :

‘?’ Matches any single character.
‘*’ Matches any sequence of characters (including the empty sequence).

Example :

s = “adceb”
p = “ab”
Output: true
Explanation: The first ‘’ matches the empty sequence, while the second ‘’ matches the substring “dce”.

Q 2.

Q3 . Given an array nums of n integers, are there elements a,  b,  c innumssuch that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.


Given array nums = [-1, 0, 1, 2, -1, -4],

A solution set is:
[-1, 0, 1],
[-1, -1, 2]

2nd Round

We may assume that no string in A is substring of another string in A.

Example 1:

Input: [“alex”, “loves”, “leetcode”]
Output: “alexlovesleetcode”
Explanation: All permutations of “alex”, “loves”, “leetcode” would also be accepted.

Q 2

Q 3

Round 3

Q 2
Input binary is given

Example :“010”
0 with 01
1 with 10.
given k, m
k is iteration, m is index
tell what is present at m index

example k= 2, m=3
iteration 1–011001
iteration 2–011010010110

ans : 0 ( value at 3rd index, 2nd iteration)

Q 3

Round 4 (Design)

Round 5 Hiring Manager

Design Snake & Ladder multiplayer game
HLD and LLD both were discussed in detail
How will you store your view on the server (Big discussion on it)
How will snake and ladders coordinates data will be stored on the server of current game session, if Snake and Ladder board is random for every game session (position of snakes and Ladders coordinate position should be random for every session of game)

Round 6 (Bar Raiser)

Find the maximum result of ai XOR aj, where 0 ? i,  j < n.

O(N) complexity was expected

Input: [3, 10, 5, 25, 2, 8]

Output: 28

Explanation: The maximum result is 5 ^ 25 = 28.

Result : Hired !

Write your Interview Experience or mail it to

My Personal Notes arrow_drop_up

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :


Please write to us at to report any issue with the above content.