Reynald continues where he left off to complete the remaining methods required to write code to execute. Once done with the core stack functionality, Reynald writes code to execute the demonstration and runs it while explaining the results. After having reviewed the output results, the student is ready to view the built-in version of this functionality in .NET with greater appreciation.
- [Instructor] All right, we are going to continue…to complete our stacked application.…And so what we're going to do is start off with…creating a peak method.…And that's going to let you see the current items…sitting at the top of the stack.…So let's just go ahead and…type in…the name of the method…to be peak.…And as stated,…all we want to do…is…indicate that the index…of the stack…is top.…
All right.…Next, is going to be to jump over to our main method.…And we are going to finish up writing the code…to execute this.…So we can start off by creating an instance of stack…called the stack.…Equals a new instance of it.…And we're going to set the limit of the stack…to be four.…Now I'll start populating this stack…with some movie names.…I'm a big fan of movies.…
So let's start off with the first movie…being Star Wars.…Now I'll go ahead and copy and paste this a few times.…And, replace the name here to be…Jaws.…And then,…Jaws two.…Not many people know that there's been…a sequel to Jaws.…So, I just like to remind people.…It's not that I couldn't think of any other movies.…
- 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.