CS sorting analysis
Title: CS sorting analysis
Category: Literature / English | Words: 1199 | Pages: 5.1 (approximately 235 words/page)
CS sorting analysis
For this lab I tested ten different sorting methods by comparing the time it took to sort ordered, reverse ordered, and random ordered arrays of Integer objects of different sizes. I had to write a Timer class that started the timer before the sorting method was called and stopped the timer when the method was finished sorting the array. The elapsed time was calculated by another method in the Timer class so that the actual
showed first 75 words of 1199 total
You are viewing only a small portion of the paper. Please login or register to access the full copy.
|
|
showed last 75 words of 1199 total
two quick sorts and improved quick sort runs faster on random lists I would say the “best” sort of the ten tested would be improved quick sort. Though there are sorts that run faster on ordered lists improve quick sort runs the best across the board and it is not slow on lists even of size 50,000. It is an in place method so it does not use any significant extra space like merge sort does.
Need a custom written paper?