Algorithm · Bloomberg · Hard
Requirements You are given a New York subway network represented by stations and links that may be directed or undirected. Implement: Clarify the following points with the interviewer: Do links represent one-way travel or two-way connections? Unless specified otherwise, treat them as undirected. Will the method be called once or repeatedly for the same network? Assume many calls, since this affects the data-structure choice. Can stations or links be inserted while the…
Checking your access…