Related Articles
Amazon Interview Experience for SDE-1 | 1.3 years Experienced (Aug-2020)
• Difficulty Level : Medium
• Last Updated : 12 Oct, 2020

Round 1 (Online Coding Round): Two questions.

1. Find number of Islands
2. Custom sorting.

You have been given the task of reordering some data from a log file. In the log file, every line is a space-delimited list of strings. All lines begin with an alphanumeric identifier. There will be no lines consisting only of an identifier.

After the alphanumeric identifier, a line will consist of either: 1) a list of words using only lowercase English letters. 2) or list of only integers.

You have to reorder the data such that all the lines with words are at the top of the log file. The lines with words are ordered lexicographically, ignoring the identifier except in the case of ties. In the case of ties (if there are two lines that are identical except for the identifier), the identifier is used to order lexicographically. Alphanumeric should be sorted in ASCII order (numbers come before letters). The identifiers must still be part of the lines in the output strings. Lines with integers must be left in the original order they were in the file.

Write an algorithm to reorder the data in the log file, according to the rules above.

Sample Input:

```logFileSize = 5
logLines =
[a1 9 2 3 1]
[g1 act car]
[zo4 4 7]
[ab1 off key dog]
[a8 act zoo]```

Sample Output:

```[g1 act car]
[a8 act zoo]
[ab1 off key dog]
[a1 9 2 3 1]
[zo4 4 7]```

Round 2 Interview (Online on Amazon Chime): Topic: DS-Algo and basic introduction

1. Find a number of triplets in an array A that satisfy the condition:  A[i] < A[j] < A[k] where i < k < j
2. HTML parsing (similar to the linked question. Just replace parenthesis with HTML tags)

Round 3 Interview (Online on Amazon Chime): Topic: DS-Algo and basic introduction

1. Discussion regarding hashing. Hashing techniques. Collision resolution. Data structure to be used for the best performance.
2. Don’t remember this question, but it was not very difficult.

Round 4 Interview (Online on Amazon Chime): Topic: DS-Algo and basic introduction

1. Zig-Zag tree traversal
2. A modification of Delete a Linked List node at a given position

Round 5 Interview (Telephonic Behavioral Test)

1. A situation when you identified a customer-facing problem and how you solved it.
2. A situation where you had to build up some features up to completion within a short time.
3. For example whenever you were in a tough situation with another team member.

Round 6 Interview (Online on Amazon Chime): It was hiring managerial round

1. Introduction.
2. Discussion regarding the current job and current project. The impact of the project and my impact on it.
3. A few behavioral/situational questions.
4. Asked me to explain the project I did during my 3rd-year internship.

Result: Selected.

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.

My Personal Notes arrow_drop_up