++ Programming Language & Give me code in Visual Studio and not the Visual Studio Code - Give me very clear and neat answers!! You are starting out at a new job as a cryptanalyst, you know, a super fancy code-breaker, and were just given your first task! When decoded, you will be able to show you understand the basics of how stacks and queues and deques work! Write your program using C++ and make sure to use the STL stack, STL queue, and STL deque data structures Please submit only your one unzipped CPP file which solves the problem This will be your starting source code file for this problem There are four strings in the file that will be used along with the three data structures to answer a question / bad joke Make sure to copy the correct string data into the correct data structures as described std::string stackString = "GI7DE1GINJTHGN"; std::string queueString = "OANRBIONWDYG"; std::string dequeString = "01IM45RWXH"; Create an empty stack Iterate through stackString and push each character onto your stack (a string is a fancy array of characters) Create an empty queue Iterate through queueString and push each character into your queue Create an empty deque Iterate through dequeString and push each character into the front of your deque Once the data structures have been properly initialized then you will process a series of operations as shown std::string commands = "2F145IF41268Q76963G5W651761W2W53G67JR1523F7W87897896769W85A4D2W85W7942357H87E8R77654"; Even if you do not end up with a fully working program, make sure to attempt each of the eight operations Iterate through the commands string and conditionally do the following for each character in order: 1 = Pop the queue 2 = Pop the front of the deque 3 = Pop the back of the deque 4 = Pop the stack 5 = COPY the top of the stack into the queue 6 = MOVE the front of the queue onto the stack 7 = COPY the front of the queue into the queue 8 = MOVE the top of the stack into the back of the deque ANYTHING ELSE = Do nothing with all three of the data structures The deque will now have the secret phrase in it, listed from front to back, so print it out, and you have your answer
In C++ Programming Language & Give me code in Visual Studio and not the Visual Studio Code
- Give me very clear and neat answers!!
You are starting out at a new job as a cryptanalyst, you know, a super fancy code-breaker, and were just given your first task!
When decoded, you will be able to show you understand the basics of how stacks and queues and deques work!
Write your program using C++ and make sure to use the STL stack, STL queue, and STL deque data structures
Please submit only your one unzipped CPP file which solves the problem
This will be your starting source code file for this problem
There are four strings in the file that will be used along with the three data structures to answer a question / bad joke
Make sure to copy the correct string data into the correct data structures as described
std::string stackString = "GI7DE1GINJTHGN";
std::string queueString = "OANRBIONWDYG";
std::string dequeString = "01IM45RWXH";
- Create an empty stack
- Iterate through stackString and push each character onto your stack (a string is a fancy array of characters)
- Create an empty queue
- Iterate through queueString and push each character into your queue
- Create an empty deque
- Iterate through dequeString and push each character into the front of your deque
Once the data structures have been properly initialized then you will process a series of operations as shown
std::string commands = "2F145IF41268Q76963G5W651761W2W53G67JR1523F7W87897896769W85A4D2W85W7942357H87E8R77654";
Even if you do not end up with a fully working program, make sure to attempt each of the eight operations
Iterate through the commands string and conditionally do the following for each character in order:
- 1 = Pop the queue
- 2 = Pop the front of the deque
- 3 = Pop the back of the deque
- 4 = Pop the stack
- 5 = COPY the top of the stack into the queue
- 6 = MOVE the front of the queue onto the stack
- 7 = COPY the front of the queue into the queue
- 8 = MOVE the top of the stack into the back of the deque
- ANYTHING ELSE = Do nothing with all three of the data structures
The deque will now have the secret phrase in it, listed from front to back, so print it out, and you have your answer!

Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images









