diff options
| author | Shinya Sato <shinnya.sato@gmail.com> | 2022-04-28 21:41:58 +0900 |
|---|---|---|
| committer | Shinya Sato <shinnya.sato@gmail.com> | 2022-04-28 21:41:58 +0900 |
| commit | eddac153a064648bee2aef6fb733ab6820bb96c3 (patch) | |
| tree | c12f212dc501e6053ec034d1a9f4734b8b94b4d2 /comparison/Python/msort-800000.py | |
| parent | 1c9344fa14cc018558ec9ebfbf1215a772960b6e (diff) | |
| download | inpla-eddac153a064648bee2aef6fb733ab6820bb96c3.tar.gz inpla-eddac153a064648bee2aef6fb733ab6820bb96c3.zip | |
v0.8.2
Diffstat (limited to '')
| -rw-r--r-- | comparison/Python/msort-800000.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/comparison/Python/msort-800000.py b/comparison/Python/msort-800000.py index fcb89e1..c244cb4 100644 --- a/comparison/Python/msort-800000.py +++ b/comparison/Python/msort-800000.py @@ -50,6 +50,15 @@ def mkRandList ( n ): a.insert(0, random.randint(0,10000)) return a + +def validation(alist): + for i in range(len(alist)-1): + if (alist[i] > alist[i+1]): + return False + + return True + + a = mkRandList(800000) mergeSort(a) -#print(a) +print(validation(a)) |
