I’ve done 95% of the work, I just need help with my comparison method.
I’ve done 95% of the work, I just need help with my comparison method. Currently when I compare the two
stacks, it returns true if they both have all of the same elements regardless of order. I need to match them exactly, i.e. [A, B, C] does not equal [C, B, A]
In this project, you will be implementing a railroad yard simulation program. The user will provide a set of incoming cars, and then a desired outgoing order. Your program will determine if the given incoming cars can be rearranged to the desired outgoing order or not. [50 points]
Background: This is an example of a control/management system: in order to deliver specific resources to specific destinations, we have to guarantee that those resources are available at their destinations. Consider: the easiest car to detact from a train transporting materials is the back most one. Thus, it would ideal to arrange the train’s cars in such a way that the order of destinations visited, matches the order of the cars. If the required car is in the middle of the train, there will be trouble! Our goal is to address this by trying to arrange the cars into the order of the destinations they will visit (“desired outgoing order”).
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"
