Question: c++ using circular queue. write own queue class. Circular Queue pgm: (Ha, I extended your classic Q to a Q in which we can delete
c++ using circular queue. write own queue class.

Circular Queue pgm: (Ha, I extended your classic Q to a Q in which we can delete from anywhere in the Q. You will need to add a method to move in the Q then to delete this element, le delete from anywhere in the Q. You will enqueue inorder to initially fill the Q.) In an ancient land, the beautiful princess named Star had many suitors. She decided on the following procedure to determine which suitor she would marty. First, all of the suitor's would be lined up one after the other and assigned a letter symbol. The first suitor would be some ascii character, the second would be the next ascii character, and so on up to the last suitor up to the last suitor ect (you can pick the symbols.). Starting at the first suitor she would then count four suitors down the line (because of the four letters in Star's name) and the fourth suitor would be eliminated from winning her hand and removed from the line (O). Star would then continue from that position in the list, counting four more suitors, and eliminate every fourth suitor. When she reached the end of the line she would continue counting circular at the beginning four suitors more (this is circular and you do not necessarily start counting from one just because you are at the front of the line. (See example below) For example, if there were six suitors then the elimination process would proceed as follows: ABCDEF initial list of suitors, start counting from 1 ABCEF suitor D eliminated, continue counting from E ACEF suitor B eliminated, continue counting from C CEF suitor A eliminated, continue counting from C suitor Celiminated, continue counting from E suitor Feliminated, is the lucky winner Note about your List class. You developed you List class (I hope) using ET (Element Type) for the data type stored in the array (List). Now the above you will need to change the typedef' of ET from int to char. If you have a good class development, then this should be one line change, if not, you will have several ints to change. Be sure not to change the ints that deal with position, size etc. just the data type stored in the list. Star had 65 suitors. khar = ''; I could be a start character? for(i=1;i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
