Update measure-MergeSort.ps1

This commit is contained in:
Markus Fleschutz 2023-08-21 20:37:47 +02:00
parent 02ad290752
commit b9b6e0aa2f

View File

@ -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 {