What is a function of a queue


Discussion:

Q1.) Modified the code so it has a Pop() function that makes the function of a Queue.

Example:

Input:

Enter Id: 1
Enter Name: Ana

Enter Id: 2
Enter Name: Carlos

Ouput:
(After a pop):

Id: 1
name: Ana

Q2.) Modified the code so it has a Pop() function that makes the function of a Stack.

Example:

Input:

Enter Id: 1
Enter Name: Ana

Enter Id: 2
Enter Name: Carlos

Ouput:
(After two pops):

Id: 2
Nombre: Carlos

Id: 1
Nombre: Ana

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: What is a function of a queue
Reference No:- TGS01937594

Now Priced at $20 (50% Discount)

Recommended (92%)

Rated (4.4/5)