This Coding Interview Question Might Have Cost Me An Internship At Facebook
I was given this question sometime back in 2019 (I think), and I unfortunately couldn’t solve this in the time given, so I didn’t even advance to the second round of interview. For the benefit of those who are new-ish to preparing for coding interviews, here’s my solution and explanation for this question.