正在加载图片...
Design our own classes A simple start-a string stack class u An important LIFo data structure Required operations Push- add an element to the stack Pop-take an element out from the top of stack Full -query whether the stack is full Empty -query whether the stack is empty a Size-query the number of elements in the stack Peek -access the element on the top of the stack, but not to pop it outDesign our own classes ◼ A simple start – a string stack class ◼ An important LIFO data structure ◼ Required operations: ◼ Push – add an element to the stack ◼ Pop – take an element out from the top of stack ◼ Full – query whether the stack is full ◼ Empty – query whether the stack is empty ◼ Size – query the number of elements in the stack ◼ Peek – access the element on the top of the stack, but not to pop it out
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有