Reynald continues where he left off to complete the remaining methods required to get at a point to write code to execute. Once done with the core queue 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're going to continue to…complete our queue application.…So, the method that we are going to work on now…is to view our content.…So let's create a public method…that returns void.…And we're going to call it view.…And what we're going to do is…write to the console…an opening bracket…that the data's going to be within.…
And then we'll have one for the closing bracket.…Except this will be right aligned so that…there's a carriage after.…And then we'll have a for loop…where we are iterating through…our queue…my queue…based on it's length.…And for each iteration…we are writing…to the console…its content…as its indices change.…
And we'll add a space…just to separate the data.…All right.…And our last step will be to…jump over to our main method…and that's create a queue.…We'll create an instance…called my queue.…And we will set its limit to five.…And so now we can say my queue and insert…some data.…I'll put in 100 at first…and then copy and paste and put in some more…numbers.…
The next one we can change that to 10.…
- 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.