Question: Task 1 : The snake with one field in the lecture was limited . Write a version flex _ queue of the queue, which allocates
Task : The snake with one field in the lecture was limited Write a version
flexqueue of the queue, which allocates new memory if the queue becomes full. Realise
realise this in the flexqueue.h and flexqueue.cpp files. Use prototypes for the flexqueue functions in the header. We double the capacity of the queue.
At the same time, the capacity of the queue should decrease again if the utilisation of the queue falls below
per cent of the capacity by half. We start with a capacity of
and will never have less than elements.
Test your implementation in the fqmain.cpp file by first inserting elements and then removing them again. The same elements must appear in the same order
occur. Check the changed capacities and make sure that there are no memory problems.
memory problems. Then do this again, but after adding times, remove
always remove first.
please solve this as simple as possible with c
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
