Explore BrainMass

Explore BrainMass

    C++ Sort and Search Evaluation

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    C++ program using Microsoft Visual Studio

    Sort & Search Evaluation

    You are to compare two sorting algorithms and to compare two searching algorithms by running and collecting data on each. Your data for sorting and searching will be strings of 25 characters in length.

    The two sorts to compare are the Bubble Sort and the Selection Sort. You are to test your sorts against different set of strings. Each sort will sort 500 strings, then they will sort 1000 strings, 1500, 2000, 2500 and 3000 strings. You will compare how well each sort did with the different data and show results. I would like to see a plot of the results. A table will do though. Use the 'time' function and the difftime function to gather sort times.

    The two searches to use for comparisons are the Linear Search and the Binary Search. You will search for 1000 strings in the array of 3000 strings and compute the average number of probes needed to find a match. The target string will be a randomly selected string from the 3000 string's data set. You will select randomly 1000 strings for testing each search algorithm.

    You are to generate 25 random characters for each string for your string data sets.

    © BrainMass Inc. brainmass.com October 10, 2019, 5:26 am ad1c9bdddf


    Solution Summary

    C++ sort and search evaluations are examined. The expert compares two sorting algorithms and two searching algorithms by running and collecting data on each.