Question: Write a program to load a sorted single byte integer array (1, 2, 5, 7, 8, 12, 20) from program memory into data memory and
Write a program to load a sorted single byte integer array (1, 2, 5, 7, 8, 12, 20) from program memory into data memory and then insert a value (from a register) into the array (in the data memory) while retaining the sorted order. If the value is already present in the array, do not insert it again. Then extend your program to iteratively insert a queue of numbers (0, 1, 10, 25, 6) residing in the program memory to the array (in the data memory) while retaining the sorted order. Note that this program will be later extended to build the data structure to decide the service requests for the lift.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
