Algorithm · Amazon · Medium
Nearby Warehouses with Stock Medium · Topics · Company Tags · Hints You are given a network of n warehouses. The connections between them are provided as a list of undirected pairs roads, where roads[i] = [a, b] means there is a direct path between warehouse a and warehouse b. A central warehouse target needs to be restocked, and you are asked to find all other warehouses that can supply it. A warehouse can supply the target if all of the following hold: It is not the target…
Checking your access…