Count Machines in a Tree
OpenAI interview questions · Hard · Coding round · 6 tests
The message-passing flavor means each node is discovered asynchronously; a good solution aggregates child subtrees concurrently instead of walking them one by one.
The full question, tests and reference solution are available with a plan that includes OpenAI.
Run your code with Ctrl+Enter to see results.