書名: Hands-On Data Structures and Algorithms with JavaScript作者名: Kashyap Mukkamala本章字?jǐn)?shù): 102字更新時(shí)間: 2021-06-30 19:12:07
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

推薦閱讀
- ASP.NET Core:Cloud-ready,Enterprise Web Application Development
- Python概率統(tǒng)計(jì)
- Learn TypeScript 3 by Building Web Applications
- Mastering JavaScript Object-Oriented Programming
- 摩登創(chuàng)客:與智能手機(jī)和平板電腦共舞
- Animate CC二維動(dòng)畫設(shè)計(jì)與制作(微課版)
- Java深入解析:透析Java本質(zhì)的36個(gè)話題
- Android開發(fā)案例教程與項(xiàng)目實(shí)戰(zhàn)(在線實(shí)驗(yàn)+在線自測(cè))
- Android開發(fā):從0到1 (清華開發(fā)者書庫)
- Learning Probabilistic Graphical Models in R
- Visualforce Developer’s guide
- Python趣味編程與精彩實(shí)例
- Unity Android Game Development by Example Beginner's Guide
- 軟硬件綜合系統(tǒng)軟件需求建模及可靠性綜合試驗(yàn)、分析、評(píng)價(jià)技術(shù)
- Microsoft XNA 4.0 Game Development Cookbook