![]() This means the hospital would serve Mary first Followed by James. We want to process these patients by highest priority first. ![]() Richard has a fractured wrist so his priority is five.Īnd lastly, Leah also has a stomach that hurts. Now you just stomach hurts, she gets priority of three. James has an arrow in his leg, he has a priority of seven. A car she has a paper cut, he has a priority of one. Each person in the waiting room has a certain condition that needs to be dealt with.įor instance, Mary is in labor. Suppose a hospital has a waiting room with n people, which need different levels of attention. One of the big problems that the index party queue solves is being able to quickly look up and dynamically change the values in your priority queue on the fly, which is often very useful. So what exactly is an indexed party queue? Well, it's a traditional priority queue variant which on top of having all the regular priority queue operations, also supports quick updates and deletes of key value pairs. But for those of you who want to know, priority queues and full detail, please check out the description for links to those. Strictly speaking, you can probably get by without watching all those videos as I will be doing a quick recap. So just before we get started, this video builds off concepts from the previous parody videos, which simply go over the basics. This is going to prove to be a very useful data structure that you wish you would have known a long time ago. My name is William and today's data structure is the indexed priority queue.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |