Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sorting and Search (implement using Java) Randomly generate a list of Strings. Each string is no longer than 15 letters. Define a method/function which take

Sorting and Search (implement using Java)

Randomly generate a list of Strings. Each string is no longer than 15 letters. Define a method/function which take a number from the user and generates that number of Strings.

Sort the List of Strings using a Selection Sort algorithm

Sort the List of Strings using a Bubble Sort algorithm

Then prepare 100 strings: 50 of them are randomly generated and the other 50 are randomly chose from the list on Strings. Implement a brute-force algorithm to search these 100 Strings in the the list of Strings and implement a recursive algorithm that takes O(logn) recursive calls.

Test each on a list of 100 and 1000 and compare the time spent

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions

Question

What is the impact of ineffective oversight by the audit committee?

Answered: 1 week ago

Question

Effective Delivery Effective

Answered: 1 week ago