Exp: BSE
YoE: <2
date: November '21
not much for intros. jumped straight into coding.
first was compare 2 linked list of strings to see if the total string across the whole list is equal. node values can be any length as well as empty.
so example would be
"w" -> "" -> "orl" -> "d"
"worl" -> "" -> "" -> "" -> "d"
would be true.
First gave a stringbuilders then compare approach. Intervewer wanted O(1) space.
Suggested a compare chars approach with 2 pointers after some thought about handling different val lengths and empty strings. Interviewer seemed happy and i coded it out.
Then, interviewer asked me
https://leetcode.com/problems/minimum-cost-for-tickets/description/
With two additional modifiers that the weekly pass ends on Saturday vs every 7 days. so if you buy on friday you only get the pass for 2 days. there was also an offset parameter for sunday so sunday may not necessarily be on day 1.
After all the discussion about the first problem, plus the explanation and questions for the second, i had less than 15 minutes to actually solve it as the interviewer stated a hard cutoff with some time for questions after.
Of course i didn't code it in time and got rejected.
So Facebook's "no dynamic Programming" policy is clearly false. And to be honest i feel i was set up for failure on this interview. Pretty annoyed by it.