DataSructure Lab 6
Laboratory Sheet 6
1.
Write a method to generate 1000
numbers between 1-1000. Use random number generator. Store the numbers in an
array of integer.
2.
Write a method to sort numbers
generated in 1. Implement selection sort.
3.
Write a method to sort numbers
generated in 1. Implement bubble sort.
4.
Write a method to sort numbers
generated in 1. Implement linear
insertion sort.
5.
Compare the time taken to sort
1000 numbers between the three methods.
6.
Repeat 1-5, with 15000 numbers.
Comments
Post a Comment