Sorting Algorithms in JavaScript
random numbers generated: 50000
# selection sort begins
took 3996 milliseconds
number of comparison: 1250025000
number of swap: 50000
The script uses approximately 5.84 MB
random numbers generated: 100000
# selection sort begins
took 55969 milliseconds
number of comparison: 5000050000
number of swap: 100000
The script uses approximately 8.61 MB