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: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Searching, Hashing and Sorting Algorithms
In your textbook Data Structures Using C++ complete the following:
Programming Exercises
Pages 527-531 and 594-598
Chapter nine: 4
Chapter ten: 14Â
Submit a screenshot of the executed program and the code of the program.
Â
Searching, Hashing and Sorting AlgorithmsIn your textbook Data Structures Using C++ complete the following:Programming ExercisesPages 527-531 and 594-598Chapter nine: 4Chapter ten: 14Submit a screenshot of the executed program and the code of the program.Chapter 94. Write a program to fnd the number oF comparisons using the binary searchand sequenTal search algorithms as Follows:Suppose list is an array oF 1000 elements.a. Use a random number generator to fll list.b. Use any sorTng algorithm to sort list. AlternaTvely, you can use theFuncTon insertOrd to iniTally insert all the elements in the list.c. Search the list For some items, as Follows:i. Use the binary search algorithm to search the list. (You might needto modiFy the algorithm given in this chapter to count the numberoF comparisons.)ii. Use the binary search algorithm to search the list, switching to asequenTal search when the size oF the search list reduces to less than15. (Use the sequenTal search algorithm For a sorted list.)d. Print the number oF comparisons For Steps c.i and c.ii. IF the item isFound in the list, then print its posiTon.Chapter 10In the Programming Example ElecTon Results, the class candidate±ype contains the FuncToncalculate±otalVotes. A²er processing the voTng data, this FuncTon calculates the total number oF votesreceived by a candidate. ±he FuncTon updateVotesByRegion (oF the class candidate±ype) updates onlythe number oF votes For a parTcular region. ModiFy the defniTon oF this FuncTon so that it also updatesthe total number oF votes received by the candidate. By doing so, the FuncTon addVotes in the main
Attachments:
-----------