Chain of Command
Asked at IMC Trading · Coding Questions · Difficulty: Medium
In an organizational structure represented as a tree with `n` members, each member is a node. The tree structure is given by an array `parent[]`, where `parent[i] = -1` means the root node, and others indicate their superior's index. A command is issued from a node and propagates to all subordinates in order of their indices. Given the starting node from which a command is issued and the `k`-th person to receive the command, return their index.
Loading the problem…
More IMC Trading interview questions
- Optimize Stock Transactions by Offsetting to Minimize Records
- Combinations Summing to a Target with Reusable Numbers
- Avoiding the Obstacles
- Chain of Command — Longest Chain Length
- Maximum Sub Square Matrix Sum Less Than K
- Minimize Waste with Container Sets