**The detailed instruction is in the attached file.
– python 3.4 or higher
– use of pycharm
– You must implement it with BellmanFord Algorithm (Or Dijkstra, FloydWarshall, bfs or dfs since these are the ones I have learnt.) It must be nothing beyond that.
– Strictly follow the instruction attached in the file.
– Must pass all the test cases shown in the attached file
– DO NOT use python dictionaries or sets (I think it is okay to use them only for initializing a table for BellmanFord) due to complexity.
– Must document each complexity and space complexity
– Make sure to write it under a function best_trades(prices, starting_liquid, max_trades, townspeople) as guided in the instruction sheet.
– Since it requires graph class, I have attached the file graph_asses.py and you can extend ur source code for the problem, using the classes(graph, vertex and edge) you can modify the classes as well.
Please ensure that you carefully check the complexity of each inbuilt python function and data structure that you use, as many of them make the complexities of your algorithms worse.
Also, I have attached a test case and please make sure to pass all the tests.