Status: New grad, Bachelors CE Top 50 US
Position: Unemployed lol
Location: Boston
Date: April 14, 2020
Phone Screen (45 mins):
- Quick chat about interviewer and what he did, not an SDE but something similar I forgot
- Started off with https://leetcode.com/problems/continuous-subarray-sum/ (Thought it was https://leetcode.com/problems/subarray-sum-equals-k/)
- I gave sliding window answer after a while and finished the question, then explained that it had O(n^2) runtime due to using the sum function
- Blanked out and couldn't think of a way to optimize of O(n), then interviewer just said to use cumulative sum and +/- when ptr increases. He didn't want me to code it ("Yeah this is just a minor thing it's a simple change we can just move on now"), but it seemed like I failed him
- Then moved onto https://leetcode.com/problems/course-schedule/ but worded differently and ask how long it would take to finish course 0 if each course takes 1 unit of time. Also no cycles.
- This one went a bit better, I didn't realize it was this LC until just now
- I first sorted based on course (0 to n-1) to see if course 0 exists. If not that means we can just return 1 (Idk if this was a good idea but he didn't mention about it)
- Then build an adjacency-list of courses to their prereqs
- BFS approach and everytime we have a child we increase time by 1
- Finished and ran through, but he pointed out if multiple courses had same pre requisites, so I put in a seen/visited check
- I was a bit on the slow side to talk through and think of the answers to his questions so this all ran to a minute before the 45 minute mark, so after that I just asked a question or two
Result:
Very quick email, recruiter thanked me for interview but I would not be proceeding forwards to on-site. Oh well!