it must be resolved in C or C++; Problem3: program 3: (program3.c, program3.h, main3.c); Problem 3: Queues 3. A queue-ba
Posted: Mon Jun 06, 2022 1:10 pm
it must be resolved in C or C++;
Problem3: program 3: (program3.c, program3.h,
main3.c);
Problem 3:
Queues 3.
A queue-based structure has by definition the rule of always
removing from the beginning and inserting new elements at the end.
Knowing this, let's practice using this concept in the following
problems:
a) Write a function that takes pairs of queues,
both of size n, divides both in half and binds the metadata to
compose two new queues, which must be returned to the user. Such
queues must be defined as dynamic.
b) Write a function that applies any
mathematical equation to the numbers in a row. This equation aims
to produce an index for the queue given as input, so it needs to be
returned along with the queue to the user.
c) Write a function that receives a set of
queues, all with indexing values according to the item
(b). Sort this group of queues by the bubble
method and return them to the user considering the highest indexing
value as the head of that order.
Problem3: program 3: (program3.c, program3.h,
main3.c);
Problem 3:
Queues 3.
A queue-based structure has by definition the rule of always
removing from the beginning and inserting new elements at the end.
Knowing this, let's practice using this concept in the following
problems:
a) Write a function that takes pairs of queues,
both of size n, divides both in half and binds the metadata to
compose two new queues, which must be returned to the user. Such
queues must be defined as dynamic.
b) Write a function that applies any
mathematical equation to the numbers in a row. This equation aims
to produce an index for the queue given as input, so it needs to be
returned along with the queue to the user.
c) Write a function that receives a set of
queues, all with indexing values according to the item
(b). Sort this group of queues by the bubble
method and return them to the user considering the highest indexing
value as the head of that order.