Algorithm · Uber · Medium
K-th Employee in Data Propagation Hard · Topics · Company Tags · Hints A company uses a hierarchy modeled as a rooted tree with n employees numbered 0 through n - 1. The manager relationships are provided in an array boss of length n: boss[i] is the direct manager of employee i. The root of the hierarchy (the most senior person) has boss[i] = -1. There is exactly one such root. When a data packet arrives at some employee, the propagation follows these rules: The current…
Checking your access…