Question: IN PYTHON. Consider an application that logs transactions. The log includes the location where a transaction originated and the time the transaction occurred and this

IN PYTHON. Consider an application that logs transactions. The log includes the location where a transaction originated and the time the transaction occurred and this information is stored such that they are ordered by the time of the transaction (see sample input below). You are required to sort this log by location while preserving the order of the time field (see sample output below). Implement an algorithm of your choice to sort this array based on the location while preserving the order of the time field. Test your algorithm with the input file provided in Canvas named NovelSortInput.txt. Explain in your report why the sorting algorithm you chose is the best for the job.

NovelSortInput.txt

Chicago 09:00:00 Phoenix 09:00:03 Houston 09:00:13 Chicago 09:00:59 Houston 09:01:10 Chicago 09:03:13 Seattle 09:10:11 Seattle 09:10:25 Phoenix 09:14:25 Chicago 09:19:32 Chicago 09:19:46 Chicago 09:21:05 Seattle 09:22:43 Seattle 09:22:54 Chicago 09:25:52 Chicago 09:35:21 Seattle 09:36:14 Phoenix 09:37:44

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!