Hey, i have a problem to solve that i give N numbers. If one number is bigger than the previous it creates a new stack. If a number is smaller than the top of one stack i must not create a new one. And i have to print how many stacks i have to create. For example:
Input:
12
20 19 22 20 21 40 30 15 20 100 120 90
Output:
6
Any ideas?