reverse a stack

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shashankjoshisam
    New Member
    • Oct 2007
    • 1

    reverse a stack

    can anybody tell me how to reverse a stack without using any big and variable sized memory block(not to use any other stack which is equal to the given stack in size).
    I have tried but could not succeed.
  • Meetee
    Recognized Expert Contributor
    • Dec 2006
    • 928

    #2
    Originally posted by shashankjoshisa m
    can anybody tell me how to reverse a stack without using any big and variable sized memory block(not to use any other stack which is equal to the given stack in size).
    I have tried but could not succeed.
    Hi,

    Can you paste it what you have tried so far? You can shift all data one step up and the by pushing top data to first bottom data and again shifting.

    Regards

    Comment

    Working...