Bloomberg Phone interview

Anonymous User
1765
Jan 15, 2023

Can anyone please provide the solution in python for this problem.

The problem was framed as a Design Problem. There is a class called Air Strip, it has two methods:

addPath(String source, String destination)
printAllPathsBetween(String source, String destination)

Here's an example of how your method would be called:

addPath('A', 'B');
addPath('B', 'C');
addPath('B', 'C');
addPath('A', 'C');
addPath('A', 'D');
addPath('D', 'C');
addPath('F', 'E');

printAllPathsBetween('A', 'C') should return:
'A -> C'
'A -> B -> C'
'A -> D -> C'

Comments (5)