Sorting Algorithms
CSCI-2467 Lab 14 – Sorting Algorithms
Background
For lab 14 you must submit both a zipped IntelliJ project AND a Word document with answers to five questions.
Download the starter project Lab14.zip. Unzip the file with 7zip using “Extract Here”. Open the Lab14 project with IntelliJ. The project contains two data files containing serialized String arrays containing surnames (from the census data set).
surnames.ser – contains 100 surnames
bigsurnames.ser – contains 25,000 surnames
Assignment
Implement a Bubble Sort for sorting arrays of Strings.
Modify the Main method to first call your Bubble Sort sort method and then call Java’s built-in sort. Make sure that your Bubble Sort is working properly. When you run the program, it will compare the run times of your Bubble Sort and the Java sort algorithm using the list of 100 surnames.
Once you are convinced the program is working, change the program to use the larger dataset. Run the program and compare the run times of the two algorithms.
Once you’ve completed the program, answer the following questions. Zip your project and submit your zipped project for grading and this Word document with your answers:
- For a list of 100 surnames, how many milliseconds did a Bubble Sort take?
- For a list of 100 surnames, how many milliseconds did a Java’s Sort take?
- For a list of 25,000 surnames, how many milliseconds did a Bubble Sort take?
- For a list of 25,000 surnames, how many milliseconds did a Java’s Sort take?
- Which algorithm is more efficient?
Answer: your answer here
Answer: your answer here
Answer: your answer here
Answer: your answer here
Answer: your answer here
We've got everything to become your favourite writing service
Money back guarantee
Your money is safe. Even if we fail to satisfy your expectations, you can always request a refund and get your money back.
Confidentiality
We don’t share your private information with anyone. What happens on our website stays on our website.
Our service is legit
We provide you with a sample paper on the topic you need, and this kind of academic assistance is perfectly legitimate.
Get a plagiarism-free paper
We check every paper with our plagiarism-detection software, so you get a unique paper written for your particular purposes.
We can help with urgent tasks
Need a paper tomorrow? We can write it even while you’re sleeping. Place an order now and get your paper in 8 hours.
Pay a fair price
Our prices depend on urgency. If you want a cheap essay, place your order in advance. Our prices start from $11 per page.