Manager and peer relationships with is_manager queries

0
Remix

Implement three functions:

  • manager(a, b): a is the manager of b.
  • peer(a, b): a and b have the same manager.
  • is_manager(a, b): return whether a is a manager of b.

Decide how to answer when peers are declared before their manager is known.

GoogleTechnical phone screenLast asked Feb 2026
No answer yet. Write the first one; the best answer gets endorsed.