mgsort
: merge sortissort
: insertion sortqksort
: quick sort
- The first line is the number of total keys to be sorted.
- The keys should be intigers.
- The key values starts from the second line, one line for each.
8
4
5
3
6
7
1
2
8
- The first line is the number of total keys.
- The key values starts from the second line, one line for each.
- From small to large, a sorted list.
8
1
2
3
4
5
6
7
8
- Compile
g++ mgsort.cpp -o mgsort.out
- Run
./mgsort.out input.txt