Recover a Hidden Word with Position Queries
Asked at Google · Coding Questions · Difficulty: Easy · Last asked Dec 15, 2025
A hidden word of fixed length is made of lowercase letters. You cannot see it; you can only ask an oracle `query(pos, letter) -> bool`, which returns `True` exactly when the hidden word has `letter` at the 0-indexed position `pos`. Recover the word without exceeding the call bound given in the rules.
Loading the problem…
More Google interview questions
- LLM conceptual questions
- Implement a Nested Tic-Tac-Toe Game Engine
- ML Fundamentals Deep Dive (AI/ML & MLE Roles)
- ML System Design: Recsys, Chatbot, Image Classifier
- Implement Scaled Dot-Product Attention
- Meeting Rooms: Minimum Rooms to Hold All Meetings