← Questions

Distance from every desk to its nearest bathroom

0
SnowflakeMicrosoftCodingLast asked Jul 2026

A coding interview question asked in Snowflake's coding round and at Microsoft, last asked Jul 2026. It tests bfs, grids and graphs.

An office floor plan is a grid. Each cell is a bathroom B, a desk D or open floor _, and you can walk through every cell.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Snowflake · Coding · Last asked Jul 202660 min · Live coding; senior loops may agree a small storage component together, then build it
  • Microsoft · Coding · Last asked Feb 202660 min · Ten to fifteen minutes of behavioral questions, then coding in HackerRank where you write a main and make the tests pass; usually three rounds · No AI unless the interviewer invites it; some 2026 loops add a round where you bring your own AI agent

What it tests

bfs · grids · graphs

Your code and the AI tutor open when you unlock this question.