The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 6 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
Part 1 — Correct Sorting Algorithms Create Java methods for each of the following, based on sorting arrays of integers: 1. Bubble Sort
2. Selection Sort
3. Insertion Sort
4. Quick Sort 5. Merge Sort
Part 2 — Time Trials for Sorting Algorithms Create a testing shell for a sorting method that that times the method. The testing shell should: - Generate a random array of integers of a prescribed length. - Start a timer.
0 Sort the array.
- Step the timer and calculate the elapsed time. You should test the five methods created for part 1 above. with increasing larger data sets -- 100, 1,000, 10,000, 100,000, 1,000,000 and 10,000,000 values First, determine which of the sizes is appropriate for each sorting method, based on the time it takes to sort. If a
method takes more than one minute, then you do not need to test the method with that size data set. For example, a
merge sort might work with 1,000,000 items in a few seconds, but a selection sort will take much longer, so it might be
okay to do the insertion sort up to 100,000 items, but not with larger data sets. You can determine exactly which size
data sets you use with each soring method — you have some flexibility, but the basic idea is not to run sorts that take more than about a minute or two to complete.
----------- ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly