Question: The insert function. If there is a current item, then the insert function must take care to insert the new item just before the current



The insert function. If there is a current item, then the insert function must take care to insert the new item just before the current position. Items that are already at or after the current position must be shifted rightward to make room for the new item. We suggest that you start by checking the precondition. Then shift items at the end of the array rightward one position each until you reach the position for the new item. For example, suppose you are inserting 14 at the location dataC1] in this sequence: data 3 6 9 1.1 [0] [1] [2] [3] [4] [5] current index used
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
