Consider the implementation of the Stack using a partially-filled…

0

Consider the implementation of the Stack using a partially-filled array. What goes wrong if we try to store the top of the Stack at location [0] and the bottom of the Stack at the last used position of the array?
A) Both peek and pop would require linear time
. B) Both push and pop would require linear time.
C) The Stack could not be used to check balanced parentheses.
D) The Stack could not be used to evaluate postfix expressions.

Ravi Garg edited question
    0
    Sonali Kapoor (anonymous)

    Its (B)

    Sonali Kapoor answered
      Add image to editor add image from link

      Question stats

      • Active
      • Views311 times
      • Answers1 answer
      • Followers1 follower
      Question and answer is powered by AnsPress