View Single Post
  #1 (permalink)  
Old 08-07-2007, 03:31 AM
carl carl is offline
Member
 
Join Date: Jul 2007
Posts: 35
carl is on a distinguished road
I want to be able to do this with stacks and queues as well as with vectors
Hi, Here's my question. I have a sample file listed bellow:

Code:
10 11 12 13 14 14 13 12 11 10 10 11 12 13 12 11 10 10 11 12 10 11 12
Note that these data are in a file. Each line in the file will contain a set of integers separated by spaces. how can I write a program that reads the name of a file from the command line, determine whether the first half of the numbers are sorted in ascending order and the second half of the numbers in descending order?? The first half and second half must contain the same integers.
I want to be able to do this with stacks and queues as well as with vectors.

Thanks.
Reply With Quote
Sponsored Links