Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 1.47 KB

README.md

File metadata and controls

23 lines (18 loc) · 1.47 KB

Player Leaderboard Sort - Console Application

Reads PlayerList.txt (created through 'Random Players - File Creator') and allows user to use 1 of 5 different sorting algorithms to sort by player score.

Snippet of what the console looks like once a sorting algorithm is chosen.

The five sorting algorithms used are:

Links of Sorting Algorithms are to their corresponding Wikipedia entries.


Creates a unordered_map<int, std::pair<std::string,int>> called playerMap using information from the file.

It does not sort the file itself, or the playerMap. Instead, it will create a vector<int> of sortedKeys that are the sorted order, and then use playerMap and sortedKeys to print the sorted table into the console.

Once you've chosen a sort method through the menu in the console, it will print the sorted list as a table into the console.

The program will use the <chrono> library to time the duration of the sort, and print it out in microseconds after printing the table.

You will have to restart the program to use a different sort method.