Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HW 3b Array-based SortedList Write a program that uses a SortedList class to manage a sorted list of numbers. The list will hold up to

image text in transcribed

image text in transcribed

HW 3b Array-based SortedList Write a program that uses a SortedList class to manage a sorted list of numbers. The list will hold up to 10 integers. The numbers are sorted in ascending order (low to high). When the list is initially created, it will be empty. Numbers can be inserted into the list (as long as the list is not full). Numbers can be deleted from the list (as long as the list is not empty). - -One of the data members of the class is an array that will be used to hold the numbers. Project: HW 3b 3 Files: SortedList.h SortedLIst.cpp main.cpp Note: Comparing the UnsortedList to the SortedList, only the insertItem and deleteltem methods are different. Therefore, copy and paste your code from HW_4a, and make changes to the insertItem and deleteltem methods. Include code to do a linear search for the insertItem method. Include code to do a binary search for the deleteltem method. - - HW 3c - Trace the steps of a Binary Search on the following sorted list. - Use the same steps and format as the example in our lecture. For each step, draw an arrow showing the location of first, midpoint, and last (first and the arrow are given in the first step) o - Do your trace on this sheet. and staple it to HW_3a and HW_3b - Must be turned on time, because we will go over the solution in class. Binary Search for 88 10 33 38 55 69 77 78 88 96 97 102 111 list (O 2] [3 [4 5 [6 7 18] [ [11] first 10 33 38 55 69 77 78 88 96 97 102 111 list (Ol [11 3 [4] 5 [6] 7[8] 9 [10 [11] 10 33 38 55 69 77 78 88 9697 102 111 listfo] [1 12] [3] [4] 15] [6 7 18] 9 [10] [11] 10 33 38 55 6 77 78 88 96 97 102 111 list [O 1 2 13] 4 [5 6] 7 [8] 9] [10] [11 10 33 38 55 69 77 78 88 96 97 102111 list [O [1 ] 13] 4 5 6 7 [8] [9 [10] [11] 10 33 38 55 69 77 78 88 96 97 102 111 list [o [1 2 3 4 [5 6 7 8] 9 [10] [11

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

Advances In Databases And Information Systems Uropean Conference Adbis 2020 Lyon France August 25 27 2020 Proceedings Lncs 12245

Authors: Jerome Darmont ,Boris Novikov ,Robert Wrembel

1st Edition

3030548317, 978-3030548315

More Books

Students also viewed these Databases questions

Question

Effective Delivery Effective

Answered: 1 week ago