Confusable number (Javascript)

JavaScript Interview with a FAANG engineer

Interview Summary

Problem type
Confusable number
Interview question
Consider an auction: there are BIDDERS in the audience. Each BIDDER is given a paddle with a unique number (e.g.: 57). At the front, there is an ORGANIZER. When a BIDDER raises their paddle, the ORGANIZER sees it and recognizes the number. For instance, a BIDDER might raise paddle #78, and the ORGANIZER recognizes the number 78.

Sometimes, however, a BIDDER accidentally holds the paddle upside down. For instance, a BIDDER with the number 68 holds it upside down, showing the number 89. The ORGANIZER assumes it's 89, which is a mistake. We'll call any number that--when turned upside down--is a different, valid number, a CONFUSABLE number.

Write a function that, given a room with 800 BIDDERS, identifies all the confusable numbers.

Read more about the questions

Interview Feedback

Feedback about Fresh Bear (the interviewee)
Advance this person to the next round? No
How were their technical skills? 3/4
How was their problem solving ability? 3/4
What about their communication ability? 3/4

Pros:

Things to think about:

Things to improve:

Verdict: Strong no hire. Didn't think through test cases thoroughly, and the solution is incomplete.
Recommendations:

Feedback about Sly Chinchilla (the interviewer)
Would you want to work with this person? Yes
How excited would you be to work with them? 4/4
How good were the questions? 4/4
How helpful was your interviewer in guiding you to the solution(s)? 4/4

Interview Transcript

Sly Chinchilla: Hello, hello, hello.
Fresh Bear: Hey, how are you doing?
Sly Chinchilla: I'm great. Can you hear me okay?
Fresh Bear: Yeah, can you hear me okay?
Sly Chinchilla: Absolutely. This is, um, this is a rare event that both of us have a working AV setup right out of the gate. Wow, that's awesome.
Fresh Bear: Yeah, they don't have a setup mode. So that's probably why people mess up.

Followed by the discussion of the interview structure and problem exploration.

Examined Test Cases and Edge Cases

Conclusion and Key Observations