Welcome![Sign In][Sign Up]
Location:
Downloads SourceCode Windows Develop Other
Title: IsStackPerms Download
 Description: Write two C++ programs (using STL preferably) to solve the stack permutation problem discussed in Chapter 3 of the textbook. (a) (5 ) Problem 1: Print all possible stack permutations of an incoming train of n elements. (command line format example): allsp <no. of elements in the incoming train> Try to execute your program when n equals 5. In addition to printing all possible stack permutations, report the total number of them. (b) (5 ) Problem 2: Check if a given permutation is producible by the stack permutation. (command line format example): issp <a file containing a given permutation> Execute your program to check if the following sequence is a valid stack permutation: 4 6 5 8 10 9 7 3 2 1 (output order: from left to right) Simply answer YES or NO in your report.
 Downloaders recently: [More information of uploader Joekids]
 To Search:
File list (Check if you may need any files):
 

IsStackPerms.cpp
    

CodeBus www.codebus.net