Round 1 (Online Coding Round): Two questions.
- Find number of Islands
- 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.
logFileSize = 5 logLines = [a1 9 2 3 1] [g1 act car] [zo4 4 7] [ab1 off key dog] [a8 act zoo]
[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
- Find a number of triplets in an array A that satisfy the condition: A[i] < A[j] < A[k] where i < k < j
- 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
- Discussion regarding hashing. Hashing techniques. Collision resolution. Data structure to be used for the best performance.
- Don’t remember this question, but it was not very difficult.
Round 4 Interview (Online on Amazon Chime): Topic: DS-Algo and basic introduction
Round 5 Interview (Telephonic Behavioral Test)
- A situation when you identified a customer-facing problem and how you solved it.
- A situation where you had to build up some features up to completion within a short time.
- 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
- Discussion regarding the current job and current project. The impact of the project and my impact on it.
- A few behavioral/situational questions.
- Asked me to explain the project I did during my 3rd-year internship.
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.