文件名称:IsStackPerms
-
所属分类:
- 标签属性:
- 上传时间:2014-05-28
-
文件大小:854byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
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.
-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.
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.
-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.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
IsStackPerms.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.