4 rounds on site: 1 Hiring Manager, 1 Bar raiser, 2 Senior Engineers and 1 Development Manager Each round: 20 - 25 mins Behavioral + 30 mins Coding + 5 mins for your Questions. Thanks a ton to the LC community. Would've been super hard if it wasn't for all the support and advice. Hopefully this helps someone out there atleast a little bit. (I'll keep adding/editing stuff as I remember them. Let me know if you have any suggestions)
Question 1. You are given a matrix consisting of integer values namely 0's, 1's and 9 (only a single 1 is present). 1 indicates the cell which is valid and you can go to the cell. 0 indicates a blocker and you cannot move to that cell. In one step, you can only move to the adjacent top,bottom, left and right cells. You have to start from the top-left cell of the matrix and find the min number of moves required to reach the destination i.e. 9 in the matrix. In case you are unable to reach the destination cell, just return -1
Approach : Breadth First Search
**Link to problem ** : https://leetcode.com/discuss/interview-question/347457
Question 2 . Given a List of Orders , where each Order is a string . For example : [aax 12 23 ] [ ff kindle ebook] are two orders. Each order has an ID which is first part of the order ( ID of order 1 = aax , ID2 = ff ). The remaining part of the order is referred to as MetaData. There are two types of orders, Prime orders ( which contain non numeric Meta Data) and Non-Prime Orders (which contain Only-Numeric Meta Data). Sort the List of Orders as given below :
a. Prime Orders before NonPrime Orders
b. Prime Order with lexicographically smaller MetaData comes first.
c. In Case of tie in (b) , the one with lexicographically smaller ID comes first.
d. The relative order of NonPrime Orders remains the same.
Approach : Use custom comparator function and sort
Link to Problem : https://leetcode.com/problems/reorder-data-in-log-files/
Question : Given a set of fishes which moves in either right or left direction and every fish has a size associated with it and the bigger fish (magnitude) eats the smaller fishes if they are facing in opposite direction. You need to find which fishes will be present at the end.
The fishes moving to the right are represented with a positive sign and the ones moving left with a negative sign.
NOTE : If two fishes have the same sign, they will keep moving as is.
Return a list of numbers repsenting how many fishes are remaining in the end.
Approach : Stack
Link to Problem : https://leetcode.com/problems/asteroid-collision/
You are given the head of a singly linked-list. The list can be represented as:
L0 → L1 → … → Ln - 1 → Ln
Reorder the list to be on the following form:
L0 → Ln → L1 → Ln - 1 → L2 → Ln - 2 → …
You may not modify the values in the list's nodes. Only nodes themselves may be changed.
Approach : Find the middle of linked list and then reorder
Link to Problem : https://leetcode.com/problems/reorder-list/
Detailed discussion on projects.
Managerial Round which mostly comprised of behavioural questions