Csis- 210 - data structures a program is to be written to


ASSIGNMENT: Stacks: Railroad switching network

A program is to be written to model a railroad switching yard. One part of the switching network consists of a main track and a siding that contains four exits onto which cars may be shunted and removed later. Railroad cars are numbered 1-7 on the right track (randomly arranged or entered by the user), they have to be moved to the left track (they have to be sorted in the left track), using the four exits. A car may be moved directly to the left track, or to one of the exits then to the left track. Use stacks to solve the problem.

Input-

The order of the cars on the right track (random or by user)

Output-

You should show a script showing the car number and the source and destination till the final solution is reached.

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Csis- 210 - data structures a program is to be written to
Reference No:- TGS01590980

Expected delivery within 24 Hours