Skip to content

Melios22/Lab3_Sorting

Repository files navigation

Lab_3-Sorting

Syntax

  • Cmd1: [File] -a [Algorithm] [input file] [Output para]
  • Cmd2: [File] -a [Algorithm] [input size] [input order] [Output para]
  • Cmd3: [File] -a [Algorithm] [input size] [Output para] Comparisons
  • Cmd4: [File] -c [Algo 1] [Algo 2] [input file]
  • Cmd5: [File] -c [Algo 1] [Algo 2] [input size] [input order]

Explanation

  • Input size: integer (< 1_000_000)

  • Input order:

    • "-rand": random data,
    • "-nsorted": nearly sorted,
    • "-sorted": sorted data,
    • "-rev": reverse order
  • Input file:

    • 1st line: an integer n
    • 2nd line: n integers, sep = ' '
  • Output para:

    • "-time": runnning time
    • "-comp": number of comparisons
    • "-both": both

Noted:

**comparations **runtime Cmd3 print all 4 case of input order

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •