Skip to content

cstandy/sorting

Repository files navigation

The implementation of different sorting algorithm

Algorithm

  • mgsort: merge sort
  • issort: insertion sort
  • qksort: quick sort

Input Format

  • 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.

Input Format Example

8
4
5
3
6
7
1
2
8

Output Format

  • 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.

Output Format Example

8
1
2
3
4
5
6
7
8

Usage

  1. Compile g++ mgsort.cpp -o mgsort.out
  2. Run ./mgsort.out input.txt

About

Implementation of common sorting algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages