Compare sorting algorithms' performance: Difference between revisions

Content added Content deleted
Line 1,708: Line 1,708:
We have also added the array as first parameter of the internal function “sorter” as Nim compiler doesn’t allow direct access to this mutable array in function “quicksort” (memory safety violation).
We have also added the array as first parameter of the internal function “sorter” as Nim compiler doesn’t allow direct access to this mutable array in function “quicksort” (memory safety violation).


{lang Nim}import algorithm
<lang Nim>import algorithm
import random
import random
import sequtils
import sequtils