With a straight face, the interviewer said to me
It's important to us that this problem reflects problems we're solving
So you get a good sense of how your day to day will be
But as we talked more and more and the solution began evolving
It was a classic dynamic programming problem
I've never needed to invert a binary tree
Or reverse a linked list
And don't even get me started on searches (binary, breadth first, depth first!)
But if I don't study these, I won't be a successful interviewee
It's the leetcode grind, It's the leetcode grind
Now that you have a working solution, could you assess the run time for me?
(It looks N Squared, we could probably do better.)
Could you now kindly in real-time derive an algorithm that sufficiently
Complicated to be named after It's inventor and published in a journal?
(Of course, we have five minutes left, that should be plenty of time.)
I've never needed to invert a binary tree
Or reverse a linked list
And don't even get me started on searches (binary, breadth first, depth first!)
But if I don't study these, I won't be a successful interviewee
It's the leetcode grind, It's the leetcode grind
Then the recruiter ghosted me
Must have been a log N solution after all
Or maybe I shouldn't have named my variable just C
Perhaps there was an internal candidate or layoffs are on the way
I'll never know, It's the leetcode grind!