Topic: Queue Problem / Level: beginner

Problem: Write a program to check if a queue can be rearranged to form a valid sequence.

Run the code to see the output here...