Jump to content

JortSort: Difference between revisions

→‎{{header|Python}}: Removed Javascript translation as it's using bad Python practices
No edit summary
(→‎{{header|Python}}: Removed Javascript translation as it's using bad Python practices)
Line 674:
jortSort('PQRST') is True
>>> </lang>
 
{{trans|JavaScript}}
<lang Python>def jortSort(array):
# sort the array
originalArray = list(array)
array.sort()
# compare to see if it was originally sorted
for i in range(len(originalArray)):
if originalArray[i] != array[i]:
return False
return True</lang>
 
=={{header|Racket}}==
35

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.