diff --git a/Scripts/measure-MergeSort.ps1 b/Scripts/measure-MergeSort.ps1 index 6eb0bd60..16f2f340 100644 --- a/Scripts/measure-MergeSort.ps1 +++ b/Scripts/measure-MergeSort.ps1 @@ -1,4 +1,25 @@ -param([int]$numIntegers = 1000) +<# +.SYNOPSIS + Measures the speed of MergeSort +.DESCRIPTION + This PowerShell script measures the speed of the MergeSort algorithm. + MergeSort is an efficient, general-purpose, and comparison-based sorting algorithm. + Most implementations produce a stable sort, which means that the order of equal elements + is the same in the input and output. Merge sort is a divide-and-conquer algorithm that + was invented by John von Neumann in 1945. A detailed description and analysis of bottom-up + merge sort appeared in a report by Goldstine and von Neumann as early as 1948. +.PARAMETER numIntegers + Specifies the number of integers to sort +.EXAMPLE + PS> ./measure-MergeSort.ps1 + 🕒 MergeSort of 1000 integers took 0.3786619 sec +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([int]$numIntegers = 1000) class MergeSort {