Status: 3+ YOE
Date: November 2020
Process:
1 x Phone Interview (1 hour)
1 x Virtual Onsite (if passed above) (5 interviews back to back 1 hour each)
Phone Interview:
Virtual Onsite:
Round 1:
Given list of courses, find minimum duration to complete all courses. Design Course, Duration , any necessary models and respective APIs as needed by your algorithm.
Clarifying Questions that I asked: do these courses have prerequisites(yes-Interviewer)? If so, is there any chance of forming a cycle(yes-Interviewer)?
My Explaination:
- Will calculate in-degree for each course [indegreeMap(courseId, list of all dependent courseIds)]
- To detect a cyclic dependencies(we can detect while putting them into indegreeMap)
- Will maintain a PriorityQueue[prioritzed based on duration] and start by picking all courses whose indegree is 0 initially
- Each time polling a course from Queue , reduce its indegree and calculate duration while doing this for all the courses.
My Mistake:
Course Model
Course { String courseId; long duration; String courseName; List<Course> prerequisite; }
APIs:
Round 2:
Given connections["a" -> "b", "b" -> "c", "c" -> "d"], print path between "a" and "c".
My Explaination: Both DFS and BFS, interviewer was satisfied with both approaches
Round 3:
Design Twitter : Clarifying questions of size of each tweet, what all should a tweet object have...?
System APIs : Post a tweet, delete a tweet, I choose to have same API to accomplish follow/unfollow operations, interviewer asked about how would you mange to do this and responded positively about my design.
Round 4
Behavioral [this one went pretty well]
Round 5: Hiring Manager
Project Discussion in depth
Overall I had positive interview experience. I think I did not match the expectations for IC-3 role in both Hiring Manager and first round.