Questions › Technical PM › Top-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?
- Technical PM
- Top-Interview
- Hard
- 15 min
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
- Technical PM
- Structured problem solving
- Communication
- Trade-off reasoning
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.
Related Technical PM questions
- Design Facebook Messenger.Top-Interview · Technical PM · Hard
- What is a technical challenge you faced in your previous project?Top-Interview · Technical PM · Hard
- What technical contributions have you made to a project?Top-Interview · Technical PM · Hard
- Design the architecture for a hardware device that measures temperature and social distance among employees in warehouses during COVID.Top-Interview · Technical PM · Hard
- Design a language learning app for Meta.Top-Interview · Technical PM · Hard
- Design the system for a ticket selling web application.Top-Interview · Technical PM · Hard
All Technical PM questions · Product manager interview questions by skill area