Skip to content

Commit 7919061

Browse files
committed
Add day 45
1 parent e8a9631 commit 7919061

File tree

5 files changed

+33
-0
lines changed

5 files changed

+33
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Motivate yourself to code daily till 60 days, and see the magic! Coding will bec
7272
| [Day 42](./day42) | [Alternate Queue Combination](./day42) | [http://codetoexpress.tech/dc/day42/](http://codetoexpress.tech/dc/day42/) | **intermediate** |
7373
| [Day 43](./day43) | [Queue Reversal](./day43) | [http://codetoexpress.tech/dc/day43/](http://codetoexpress.tech/dc/day43/) | **intermediate** |
7474
| [Day 44](./day44) | [Queue from Stacks](./day44) | [http://codetoexpress.tech/dc/day44/](http://codetoexpress.tech/dc/day44/) | **intermediate** |
75+
| [Day 45](./day45) | [Priority Queue](./day45) | [http://codetoexpress.tech/dc/day45/](http://codetoexpress.tech/dc/day45/) | **intermediate** |
7576

7677
## [More Problems](./BONUS/README.md)
7778

day44/ques.png

-944 KB
Binary file not shown.

day45/JavaScript/priorityQueue.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// To Be Added

day45/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
![cover](./cover.png)
2+
3+
# Day 45 - Implement a priority queue
4+
5+
Implement the Priority Queue data structure
6+
7+
### Priority Queue
8+
9+
Priority Queue is an extension of queue with following properties
10+
11+
1. Every item has a priority associated with it.
12+
2. An element with high priority is dequeued before an element with low priority.
13+
3. If two elements have the same priority, they are served according to their order in the queue.
14+
15+
A typical priority queue supports following operations.
16+
17+
1. **insert(item, priority):** Inserts an item with given priority.
18+
2. **getHighestPriority():** Returns the highest priority item.
19+
3. **deleteHighestPriority():** Removes the highest priority item
20+
21+
[Read More (Geeks4Geeks)](https://www.geeksforgeeks.org/priority-queue-set-1-introduction/)
22+
23+
## Solution
24+
25+
## JavaScript Implementation
26+
27+
### [Solution](./JavaScript/priorityQueue.js)
28+
29+
```js
30+
// To Be Added
31+
```

day45/cover.png

140 KB
Loading

0 commit comments

Comments
 (0)