Write a program of linked-list which has an integer field


Problem:

Question: A program is maintaining two data structures

(a) A linked-list which has an integer field and

(b) An array of integers. The same numbers appear in ascending order in both data structures.

The numbers in the array are not stored at their corresponding subscript positions but in such a way that no array gaps exit between any two consecutive numbers. Assume that both structures have 10 numbers. So insertion of a middle number is done by first shifting the larger numbers.

For each data structure, give:

(a) The number of positions affected {*} by inserting a number smaller than all numbers.

(b) The number of positions affected by a request to display the tenth number in the list.

{*} affected here means moved, checked, passed.

 

Please how linked list is prepared for the described question.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program of linked-list which has an integer field
Reference No:- TGS0892784

Expected delivery within 24 Hours