Description: Using queue structures to achieve car Rearrangement. Rearrangement inside the following: a freight train and rode a total of n cars, each car has its own number, number range from 1 ~ n. Compartment of any order given by the transition point will be re-arranged car number in sequence 1 ~ n. Transition point total of k-rail buffer, the buffer between the rail in the orbit and the derailment. Beginning of orbit into the buffer from the rail car after rail rearrangement buffer, press 1 ~ n the order into the derailment. Rail in accordance with the FIFO buffer mode, write an algorithm to order the car for any rearrangement, the output of each track in the buffer compartment number.
File list (Check if you may need any files):
Debug\chexiang.exe
.....\chexiang.ilk
.....\chexiang.obj
.....\chexiang.pch
.....\chexiang.pdb
.....\vc60.idb
.....\vc60.pdb
Debug