mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 08:16:50 +08:00
merge: Format codebase with standard.js
(#989)
* Auto-update DIRECTORY.md * fix: some redundancy according to standard javascript library Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -77,7 +77,7 @@
|
|||||||
* [CycleDetection](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/CycleDetection.js)
|
* [CycleDetection](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/CycleDetection.js)
|
||||||
* [DoublyLinkedList](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/DoublyLinkedList.js)
|
* [DoublyLinkedList](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/DoublyLinkedList.js)
|
||||||
* [RotateListRight](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/RotateListRight.js)
|
* [RotateListRight](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/RotateListRight.js)
|
||||||
* [SingleCircularLinkedList](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/SingleCircularLinkedList.js.js)
|
* [SinglyCircularLinkedList](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/SinglyCircularLinkedList.js)
|
||||||
* [SinglyLinkedList](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/SinglyLinkedList.js)
|
* [SinglyLinkedList](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Linked-List/SinglyLinkedList.js)
|
||||||
* Queue
|
* Queue
|
||||||
* [CircularQueue](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Queue/CircularQueue.js)
|
* [CircularQueue](https://github.com/TheAlgorithms/Javascript/blob/master/Data-Structures/Queue/CircularQueue.js)
|
||||||
|
@ -18,7 +18,7 @@ function Trie () {
|
|||||||
Trie.findAllWords = function (root, word, output) {
|
Trie.findAllWords = function (root, word, output) {
|
||||||
if (root === null) return
|
if (root === null) return
|
||||||
if (root.count > 0) {
|
if (root.count > 0) {
|
||||||
if (typeof output === 'object') { output.push({ word: word, count: root.count }) }
|
if (typeof output === 'object') { output.push({ word, count: root.count }) }
|
||||||
}
|
}
|
||||||
let key
|
let key
|
||||||
for (key in root.children) {
|
for (key in root.children) {
|
||||||
|
@ -18,7 +18,7 @@ function plotLine (label, points, width, height) {
|
|||||||
type: 'scatter',
|
type: 'scatter',
|
||||||
data: {
|
data: {
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: label,
|
label,
|
||||||
data: points,
|
data: points,
|
||||||
showLine: true,
|
showLine: true,
|
||||||
fill: false,
|
fill: false,
|
||||||
|
@ -42,7 +42,7 @@ export function TopologicalSorter () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
finishingTimeList.push({
|
finishingTimeList.push({
|
||||||
node: node,
|
node,
|
||||||
finishTime: ++finishTimeCount
|
finishTime: ++finishTimeCount
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user