implementation of stack

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • this is kiran
    New Member
    • Aug 2007
    • 9

    implementation of stack

    implementation of stack using arrays
  • this is kiran
    New Member
    • Aug 2007
    • 9

    #2
    stack in python

    implementation of stack using linked lists

    Comment

    • this is kiran
      New Member
      • Aug 2007
      • 9

      #3
      stack program

      how to write a program using stack in python, i know the concept but not able to write a python code for it. could you please show me a sample program.

      Comment

      • bvdet
        Recognized Expert Specialist
        • Oct 2006
        • 2851

        #4
        Originally posted by this is kiran
        implementation of stack using arrays
        A simple example:[code=Python]>>> import array
        >>> a = array.array('i' )
        >>> for i in range(10):
        ... a.append(i)
        ...
        >>> a
        array('i', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
        >>> for i in range(10):
        ... print a.pop()
        ...
        9
        8
        7
        6
        5
        4
        3
        2
        1
        0
        >>> a
        array('i')
        >>> [/code]

        Comment

        • bartonc
          Recognized Expert Expert
          • Sep 2006
          • 6478

          #5
          Originally posted by this is kiran
          implementation of stack using linked lists
          This you your LAST WARNING, my friend.
          Violation:
          1. Tripple posting
          2. Poorly formulated question
          3. No effort to show that you have done any work
          It's all in the Posting Guidelines.
          One more infraction will result in a one week ban on your account.
          Thank you for your attention in this matter.

          Comment

          • this is kiran
            New Member
            • Aug 2007
            • 9

            #6
            thank you very much this is really help full for me

            Comment

            • this is kiran
              New Member
              • Aug 2007
              • 9

              #7
              thank you, i must follow those

              Comment

              Working...