PMMockr

QuestionsTechnical PMTop-Interview

Given an array of numbers where every number occurs twice except one, how would you find the unique number in O(log n) time?

Focus on leveraging the properties of binary search to achieve O(log n) time complexity. Start by discussing how the array can be sorted or structured to facilitate this search. Explain how you would identify the mid-point of the array and use the properties of the indices and the values to determine which half of the array to search next. Be prepared to illustrate your thought process with examples and edge cases, such as handling arrays of different lengths and ensuring the solution works for both odd and even counts of numbers.

What this question tests

Practise this question under interview conditions. Answer it out loud against a timer with an AI interviewer that asks follow-ups, then review the scored report.

Start a timed mock interview

Related Technical PM questions

All Technical PM questions · Product manager interview questions by skill area