Appeared for SSE (L5-A) backend position
Interviewer won't help at all. He pasted the question and then turned off his audio video.
Optimized working solution is expected.
[Rejected]
I again appeared for different job ID for same SSE position
- You are given a list of edges [[a,b], [b,c], [d,f], [f,g]]. Here a,b means a is manager of b. You have to implement 3 functions:
a. Return total number of employees under a manager (both direct and indirect)
b. Change the manager of an employee. If that employee has some reportees then those will also be affected.
c. Add new employees. Eg: [c,d] needs to be added.
Input format was not hardcoded. You have to write the main function on how input will be given to these apis.
Basically if you create a tree structure you would be able to solve this question. The key was to have optimized solution such that (a) part should have TC - O(1)
I couldn't come up with optimized solution in the given time.
[Rejected]
Comments (5)


