Railroad Yard Simulation Program
2 Pages974 Words444 Views
About This Document
Implement a railroad yard simulation program to determine if the given incoming cars can be rearranged to the desired outgoing order or not. Use stack(s) and queue(s) to store trains and move cars. The program takes incoming cars from the user until they input 'DONE' and outgoing cars from the user until they have given as many cars as they did for incoming cars. The program prints out whether or not the given input cars can be matched to the given output.