Question: (c) Johnny wants to process data inventory by using an array. The operations needed in this system are deleting items, adding new items, and sorting



(c) Johnny wants to process data inventory by using an array. The operations needed in this system are deleting items, adding new items, and sorting data based on the item code. However, his group member, Marzuki does not agree because using an array is not efficient. 0 Justify that Marzuki's argument is true. [3 marks) Give a suggestion of the data structure that is suitable for handling this case. [3 marks] (iii) According to Siva, this case could be handled by using a queue. Explain if this is possible [3 marks) (b) The following questions refer to the flowchart in Figure Q1(b). start Initialize counter, number_of_elments Insertion position, False Arr [1] True - Arr[i-1] i-- Arr[k] = new_item End Figure Q1(b) (1) Based on the requirements depicted in Figure Q1(b), construct a C++ code segment to execute the insertion algorithm [5 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
