Hey y’all, I’m hoping everyone had as relaxing of an MLK weekend as possible. I have another solution up for an extremely common Meta interview question: Leetcode 21 Merge Two Sorted Lists.
The catch is, they almost never ask the original Leetcode problem. Instead, they opt for one of two variants: one, what if you had to merge 3 sorted arrays of integers (so, not linked lists), and two, what if you had to merge 3 sorted arrays of integers but without duplicates?
TBH, this variant floats around this community very often - but it still throws candidates off-guard. Hopefully with this video, it doesn’t happen anymore.
And for reference, here’s another helpful post:
LC 283: Move Zeroes
As a quick note, we’re starting to include the Python code in the repository since people have been requesting it.
Reference to the OG LC problem: https://leetcode.com/problems/merge-two-sorted-lists/description/
Good luck on your phone screens & onsite loops.