2013年11月30日星期六

week #2 ----Stacks

In the second week, I learn Stacks ADT, which include the following operations:

  • __init__ (Initialize a new empty stack)
  • push (add a new item to the stack
  • pop (remove and return an item from the stack. the item that is returned is always the last one that was added)
  • is_empty (check whether the stack is empty)
The data structure is LIFO called "Last in, First out"

没有评论:

发表评论