← Questions

Feature flags across channels with inheritance

0
CoreWeaveCodingLast asked Jan 2026

Build a feature flag store organized by channels. Each channel has an id, its own map of flag names to true or false, and zero or more parent channels. Looking up a flag on a channel returns the channel's own value if it sets one, otherwise the value from the nearest parent that sets it, and false when no ancestor does.

  1. Implement creating a channel (with its flags and parents), reading a flag, setting a flag on a channel, and deleting a channel.
  2. In production, lookups far outnumber changes. How would you make reads fast?
  3. When a flag changes on one channel, how do you keep lookups correct and fast for every channel that inherits from it, at scale?

Reported for a Weights & Biases team, now part of CoreWeave.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding