I solved both the problems, explaining approach, getting buy-in, coding, explaining line-line, verification, mentioning time & space complexity. I solved within the time constraints, and there was extra time to ask questions about Meta. I was clearly expecting a pass, and was thinking about next interview loop. Sadly, I got reject. It's perplexing.
Q1: Merge 3 sorted arrays with no duplicates allowed
Q2: Variant of 545
First problem I solved as MergeTwo(MergeTwo(A, B), C) approach. When asked followup on how to do it in a single loop. I explained 3 pointer approach. Interviewer seems satisfied. Both the approaches would have same time and space complexities. But Single loop solution looks cleaner.
For the second problem I was explaining my thought process, and interviewer threw a hint, but I would have figured that anyways. Finished coding and dry running code, explaining time & space complexities.
Sometimes, it's just not your day. But it's kinda disappointing, waiting 12 months for another opportunity. Still figuring out what went wrong. I appreciate some motivation, at this point I can't get back to the grind.
Update: Two-Pass solution is more optimized. Following is the benchmark at runtime
N = 10. Two pass approach performed 51.8519% better
Two-pass: 130, Three-pass: 270 comparisions.
N = 100. Two pass approach performed 49.1582% better
Two-pass: 1510, Three-pass: 2970 comparisions.
N = 1000. Two pass approach performed 45.312% better
Two-pass: 16390, Three-pass: 29970 comparisions.
N = 10000. Two pass approach performed 44.5711% better
Two-pass: 166270, Three-pass: 299970 comparisions.
N = 100000. Two pass approach performed 44.4611% better
Two-pass: 1666150, Three-pass: 2999970 comparisions.
N = 1000000. Two pass approach performed 44.4465% better
Two-pass: 16666030, Three-pass: 29999970 comparisions.