YOE: 15+
Working at a small non-tech firm for the last 10 years and have been out of the interview cycle for a while. Rusty overall on interviews and DS/Algo, but did take the time to work on LC since mid-July. Still a long way to go, but I hope that my post will bring some measure of motivation to someone in a similar situation.
Overall I did well on the LP, while I do not work on cool technologies all the time, given the size of my organisation I handle a lot of reponsibities. During the LP questions I did get the feel that the interviewers could relate and find value in my stories.
Round1: I was not "in the zone" yet and I think that this was the round that ultimately decided my fate, at least tech wise.
Was given a question that was about 25 lines long, but the gist was that cars would send GPS data every second and I was to design a query service, which when given a location on a map and a date range, would return the number of cars that passed that point in the date range.
I did not ask enough questions here, was overwhelmed given the wall of text I was presented with and the 25 minutes that I had left.
Should have asked -
a. Am I responsible for storing the data as well?
b. Do I assume that the data is already stored in some form and I just query it?
c. Could I pre-process, maybe bring in some form of database and leverage that to produce the results.
I tried this in memory using some form of Dictionary<Point,Dictionary<time,List<carids>>> and that was not the approach to take. I should have leveraged some form of data persistence to accomplish this.
The interviewer was new to interviewing, my belief is that a more seasoned interviewer may have helped me refocuss on the important questions, but again, not denying that I am at fault here.
Round2: System Design. Was asked to describe a distributed order processing system that I had designed at my workplace. It worked across 3 disconnected systems and keeping the data consistent was a challenge and there were questions around that.
Was asked to design a Library management system, went over APIs, data model and overall system design.
Round3: Given a list of integers that is too large to fit in memory how would you handle calculating the sum for it.
Wrote code to break the list into sub-list and process them on seperate threads based on processor core count.
Followups -
a. Calculate average for this giant list, it would the sum from above divided by the number of items in the list - nothing fancy.
b. Calculate median for this giant list. This would require sorting the individual sub-lists and then looking at the middle elements from each sorted list. The middle element from the list of middle elements is the median of the entire list.
Round4: LC Medium - https://leetcode.com/problems/populating-next-right-pointers-in-each-node/
I used BFS, O(n) on both space and time.
Followup -
Better space optimisation, could not remeber at that time, but one could use DFS style level by level traversal to track last "neighbor" at a given level in order to populate the right pointers.
I tried a different approach during the interview, should have given the followup question some more thought.
Overall a very easy interview in my opinion.
FEEDBACK -
a. Not enough experience managing teams (surpised about this one since I did not mention team lead level experience at my current job, was a lead at my last job though, I'm more of an individual contributor at my current job)
b. Something missing on the technical side - yes, can relate to that based off of the first round.