官术网_书友最值得收藏!

API

This is the tricky part, as it is very hard to predict ahead of time what kinds of method your application will require. Therefore, it's usually a good idea to start off with whatever is the norm and then make changes as your applications demand. Going by that, you would end up with an API that looks something like this:

  • Push: Pushes an item to the top of the stack
  • Pop: Removes an item from the top of the stack
  • Peek: Shows the last item pushed into the stack
  • Clear: Empties the stack
  • Size: Gets the current size of the stack
主站蜘蛛池模板: 东海县| 富平县| 揭东县| 栾川县| 岢岚县| 安平县| 个旧市| 象山县| 紫云| 调兵山市| 青海省| 临邑县| 西贡区| 遂昌县| 从化市| 阿拉善右旗| 思茅市| 米泉市| 正蓝旗| 江西省| 东源县| 京山县| 开平市| 洛川县| 望奎县| 巢湖市| 靖江市| 泽普县| 竹北市| 阿荣旗| 新民市| 鸡东县| 宝山区| 乌审旗| 印江| 宕昌县| 罗平县| 龙胜| 塔城市| 灌云县| 固原市|