Round 1:
Write Java code for below, my approach was to build a graph and then compute the in degree of all the vertices then ask was to implement it in < O(V) time complexity
/**
subordinate, manager
A, C
B, C
C, F
D, E
E, F
F, F
countReports(employeeId) -> num // sum of direct and indirect reports for employee with id=employeeId
eg.
A -> 0
C -> 2 // A, B
F -> 6 // C, E, F, A, B, D
Ask:
* implement countReports
*/Round 2: Add Strings "19999+1" similar to https://leetcode.com/problems/add-strings/
Round 3: Search in rotated sorted array
round 4: Hiring Manager's Behavioural round