PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Atlassian

Find a secret word using match feedback

Last updated: Mar 29, 2026

Quick Overview

This question evaluates algorithmic problem-solving, combinatorial reasoning, and information-theoretic search strategies for narrowing a secret from a candidate set using match-count feedback.

  • hard
  • Atlassian
  • Coding & Algorithms
  • Machine Learning Engineer

Find a secret word using match feedback

Company: Atlassian

Role: Machine Learning Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Onsite

You are given a list of unique words, each with the same length (e.g., 6 lowercase letters). One of these words is the **secret**. You can repeatedly make a guess by choosing a word from the list. After each guess, you receive feedback: the number of positions where your guessed word exactly matches the secret word (same character and same index). ## Task Design an algorithm that finds the secret word within a limited number of guesses (e.g., at most 10), by choosing guesses adaptively based on feedback. ## Details - Feedback is an integer from `0` to `L` where `L` is word length. - After each guess, you may use the feedback to eliminate impossible candidate words. ## What to discuss - How to pick the next guess to minimize the worst-case remaining candidates. - Time complexity considerations for up to a few thousand words.

Quick Answer: This question evaluates algorithmic problem-solving, combinatorial reasoning, and information-theoretic search strategies for narrowing a secret from a candidate set using match-count feedback.

Related Interview Questions

  • Compute a moving average on a stream - Atlassian (hard)
  • Implement sequential and parallel URL requests - Atlassian (medium)
  • Implement sliding-window rate limiter function - Atlassian (medium)
  • Merge intervals and design rating APIs - Atlassian (medium)
  • Filter Invalid Data Events - Atlassian (easy)
Atlassian logo
Atlassian
Mar 1, 2026, 12:00 AM
Machine Learning Engineer
Onsite
Coding & Algorithms
4
0
Loading...

You are given a list of unique words, each with the same length (e.g., 6 lowercase letters). One of these words is the secret.

You can repeatedly make a guess by choosing a word from the list. After each guess, you receive feedback: the number of positions where your guessed word exactly matches the secret word (same character and same index).

Task

Design an algorithm that finds the secret word within a limited number of guesses (e.g., at most 10), by choosing guesses adaptively based on feedback.

Details

  • Feedback is an integer from 0 to L where L is word length.
  • After each guess, you may use the feedback to eliminate impossible candidate words.

What to discuss

  • How to pick the next guess to minimize the worst-case remaining candidates.
  • Time complexity considerations for up to a few thousand words.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Atlassian•More Machine Learning Engineer•Atlassian Machine Learning Engineer•Atlassian Coding & Algorithms•Machine Learning Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.