Reynald walks through a detailed example of the queue built in .NET. The purpose is so the student familiarizes themselves with the built-in version of this concept in .NET. Reynald talks through the API and some executions of them. After having created a custom version of the algorithm, the student should have a better understanding as to what’s happening behind the scenes in the built-in version in .NET.
- [Instructor] Okay so just like .net had a stack…class, it also has a queue built in.…To get more details you can just go again…to the definition and see all the different…methods that are available there.…Now, let's take a look at some of the features…that's used in the code here.…Enqueue is used to add and if I just deleted that…and hit the period, you could see the other…available methods we could invoke here also.…
Dqueue of course is the opposite.…So, after populating our queue on lines 20 through 25,…we simply print out to the console and what follows…is the content of the queue and then we iterate…through the queue and write it out to the…console on lines 29 through 32.…Starting on 34, we dequeue a movie and then…line 36 we see that we're invoking peek…to see what the next item is to dequeue.…
That is, what is the next items that will be…dequeued if we choose to do so.…Right after that, we actually dequeue.…On line 39, we create a copy of the array…using the two array method and the constructor…that accepts innumerables…
- 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.