Reynald defines a stack: a basic data structure that can be logically thought of as linear structure represented by a real physical stack or pile, a structure where insertion and deletion of items takes place at one end called top of the stack. He then provides a visual representation so that the student is fully prepared to write their own version in the video that follows.
- [Teacher] So I want to talk to you about…a data structure called the Stack.…Now, a formal definition for it is…that it's a data structure that serves…as a collection of elements.…But I want you to think of it as…just a bunch of things piled on top of each other,…and that's exactly what we normally would think of…when we hear the word stack.…Now there's two important features with this data structure,…and those features are referred to as push and pop.…Now when we the term push,…it's when we add an element to that collection.…
And pop is when we remove the most recently added element.…Now the important thing about this structure,…which are very similar to real life,…is that the last thing that was put on top of the stack…is usually the first to be removed.…And that concept is referred to as LIFO,…which stands for last in, first out.…If you were to look at these two stacks of dinner plates,…after you put one dish on top of the stack,…that's probably the one that someone else is going to take…when they're using the plates from the dinner stack.…
- Working with linked lists
- Creating a stack
- Defining a queue
- Performing a binary search
- Finding target values with a linear search
Skill Level Beginner
1. Algorithms and Data Structure Overview
Reasons for this course1m 26s
2. Linked List
5. Binary Search
6. Linear Search
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.