Question: Below are function prototypes that are valid in various data structures. insert (int number) //add a number to the data structure int remove() // pull

Below are function prototypes that are valid in various data structures.

insert (int number) //add a number to the data structure int remove() // pull a number from the data structure and delete it

The operations were performed in the following order on an initially completely empty data structure named ds

insert( 123 );

insert( 45 );

printf(%d, , remove());

insert( 6 );

insert( 78 );

remove();

printf(%d, , remove());

insert( 910 );

printf(%d, , remove());

a) What is the output if ds is a queue structure? b) What is the output if ds is a stack structure?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!