← Back to experiences
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/experiences/…$
Round 1: Write Java code for the following, my approach was to build a graph and then compute the in-degree of all the vertices. The task 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 Add Strings from Leetcode. Round 3: Search in rotated sorted array. Round 4: Hiring Manager's Behavioural round.