First Round at GHC’19
- Given a Maze image and a start and end point, find the best path to reach the end point. Constraints: The maze can be of irregular shape.
Idea: map the maze paths to a graph and traverse using DFS.
Onsite Rounds
Round 1:
- Resume walk through
-
https://leetcode.com/problems/k-diff-pairs-in-an-array/
Solved using 1. hash map 2. Sorting followed by range binary search
Asked to write complete codes for both
Round 2:
- Resume walk through
- Long discussion on one project. General questions such as challenges faced etc.
- https://leetcode.com/problems/group-anagrams/
- How to implement a task scheduler such that there are no read/write conflicts among registers.
Example:
Format: Task#: \<Input register\> \<Input register\> \<Output register\>
Task 1: R1 R2 R3
Task 2: R3 R4 R4
Task 3: R3 R4 R5
Task 4: R4 R5 R6
Ans: 1 , 2 < 3 < 4
Idea: topological sort and map. Little tricky as there are 2 inputs, need to use reverse topological sort and reverse map may be.
Did not ask me to code
Round 3 and Lunch interview:
- Discussed two projects on resume. Asked for some details of the projects.
- Design a timer and a music player for mobile. Asked me to write an API for music player.
- Lunch: More and more discussion, questions from both the parties …
Round 4:
- General behavioural questions like project discussion, challenges faced during projects, collaboration with the team, contribution in the projects, more on soft skills etc.