1.Draw a table showing the final contents of the memory cells if the instruction in question 16 had been to push the letter D on the stack rather than to pop a letter. What would the value in the stack pointer be after the push instruction?
2.How would you design a stack which, in addition to the traditional push and pop operations, also supports an operation called min which returns the element having the minimum value in the stack? push, pop, and min should all operate in O(1) time.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here