fix(guide): restructure curriculum guide articles (#36501)

* fix: restructure certifications guide articles
* fix: added 3 dashes line before prob expl
* fix: added 3 dashes line before hints
* fix: added 3 dashes line before solutions
This commit is contained in:
Randell Dawson
2019-07-24 00:59:27 -07:00
committed by mrugesh
parent c911e77eed
commit 1494a50123
990 changed files with 13202 additions and 8628 deletions

View File

@@ -1,9 +1,10 @@
---
title: Create a Priority Queue Class
---
## Create a Priority Queue Class
# Create a Priority Queue Class
### Method:
---
## Problem Explanation
- Priority Queue is an Abstract Data Type.
- It can be implemented using other Data Structures but is commonly implemented using a Heap.
- Each node contains a priority. When we enqueue a node to the queue, it's "bubbled up" to its place in the queue.
@@ -18,7 +19,11 @@ title: Create a Priority Queue Class
| Priority Queue | 1 | 1 | logn | logn |
### Solution:
---
## Solutions
<details><summary>Solution 1 (Click to Show/Hide)</summary>
```js
//function which swaps elements in array, using ES6 syntax
function swap(arr, i, j) {
@@ -121,5 +126,7 @@ class PriorityQueue {
}
```
### References:
#### Relevant Links
- [Wikipedia](https://en.wikipedia.org/wiki/Priority_queue)
</details>