fix: remove end of line chars after code blocks (#41498)

This commit is contained in:
Randell Dawson
2021-03-16 08:49:43 -06:00
committed by GitHub
parent 843eb81632
commit d2f4b70ea6
4 changed files with 17 additions and 6 deletions

View File

@ -12,11 +12,15 @@ In this challenge you will be creating a Priority Queue. A Priority Queue is a s
For instance, lets imagine we have a priority queue with three items:
`[['kitten', 2], ['dog', 2], ['rabbit', 2]]`
```js
[['kitten', 2], ['dog', 2], ['rabbit', 2]]
```
Here the second value (an integer) represents item priority. If we enqueue `['human', 1]` with a priority of `1` (assuming lower priorities are given precedence) it would then be the first item to be dequeued. The collection would look like this:
`[['human', 1], ['kitten', 2], ['dog', 2], ['rabbit', 2]]`.
```js
[['human', 1], ['kitten', 2], ['dog', 2], ['rabbit', 2]]
```
Weve started writing a `PriorityQueue` in the code editor. You will need to add an `enqueue` method for adding items with a priority, a `dequeue` method for removing and returning items, a `size` method to return the number of items in the queue, a `front` method to return the element at the front of the queue, and finally an `isEmpty` method that will return `true` if the queue is empty or `false` if it is not.