Two stacks of positive integers are needed, one containing elements withvalues less than or equal to 1,000 and the other containing elements with values larger than 1,000.The total number of elements in the small-value stack and the large-value stack combined are notmore than 200 at any time, but we cannot predict how many are in each stack. (All of the elements2could be in the small-value stack, they could be evenly divided, both stacks could be empty, andso on.).
Implement the push operation; it should store the new item into the correct stack accordingto its value (compared to 1,000).
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here