A Common-Sense Guide to Data Structures and Algorithms: Level Up Your Core Programming Skills by Jay Wengrow
Author:Jay Wengrow [Wengrow, Jay]
Language: eng
Format: azw3, epub, pdf
Tags: Pragmatic Bookshelf
Publisher: Pragmatic Bookshelf
Published: 2017-08-03T04:00:00+00:00
Stacks
A stack stores data in the same way that arrays do—it’s simply a list of elements. The one catch is that stacks have the following three constraints:
Data can only be inserted at the end of a stack.
Data can only be read from the end of a stack.
Data can only be removed from the end of a stack.
You can think of a stack as an actual stack of dishes: you can’t look at the face of any dish other than the one at the top. Similarly, you can’t add any dish except to the top of the stack, nor can you remove any dish besides the one at the top. (At least, you shouldn’t.) In fact, most computer science literature refers to the end of the stack as its top, and the beginning of the stack as its bottom.
While these restrictions seem—well—restrictive, we’ll see shortly how they are to our benefit.
To see a stack in action, let’s start with an empty stack.
Inserting a new value into a stack is also called pushing onto the stack. Think of it as adding a dish onto the top of the dish stack.
Let’s push a 5 onto the stack:
Download
A Common-Sense Guide to Data Structures and Algorithms: Level Up Your Core Programming Skills by Jay Wengrow.epub
A Common-Sense Guide to Data Structures and Algorithms: Level Up Your Core Programming Skills by Jay Wengrow.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Modelling of Convective Heat and Mass Transfer in Rotating Flows by Igor V. Shevchuk(6079)
Weapons of Math Destruction by Cathy O'Neil(5595)
Factfulness: Ten Reasons We're Wrong About the World – and Why Things Are Better Than You Think by Hans Rosling(4333)
Descartes' Error by Antonio Damasio(3029)
A Mind For Numbers: How to Excel at Math and Science (Even If You Flunked Algebra) by Barbara Oakley(2969)
Factfulness_Ten Reasons We're Wrong About the World_and Why Things Are Better Than You Think by Hans Rosling(2927)
TCP IP by Todd Lammle(2878)
Applied Predictive Modeling by Max Kuhn & Kjell Johnson(2732)
Fooled by Randomness: The Hidden Role of Chance in Life and in the Markets by Nassim Nicholas Taleb(2711)
The Tyranny of Metrics by Jerry Z. Muller(2677)
The Book of Numbers by Peter Bentley(2635)
The Great Unknown by Marcus du Sautoy(2396)
Once Upon an Algorithm by Martin Erwig(2336)
Easy Algebra Step-by-Step by Sandra Luna McCune(2335)
Lady Luck by Kristen Ashley(2280)
Practical Guide To Principal Component Methods in R (Multivariate Analysis Book 2) by Alboukadel Kassambara(2265)
Police Exams Prep 2018-2019 by Kaplan Test Prep(2227)
All Things Reconsidered by Bill Thompson III(2135)
Linear Time-Invariant Systems, Behaviors and Modules by Ulrich Oberst & Martin Scheicher & Ingrid Scheicher(2106)
