diff --git a/README.md b/README.md index 4a870ccfed..f0e90fc8d3 100644 --- a/README.md +++ b/README.md @@ -301,7 +301,8 @@ npm test -- 'playground' ### References -[▶ Data Structures and Algorithms on YouTube](https://www.youtube.com/playlist?list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8) +- [▶ Data Structures and Algorithms on YouTube](https://www.youtube.com/playlist?list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8) +- [✍🏻 Data Structure Sketches](https://okso.app/showcase/data-structures) ### Big O Notation diff --git a/src/algorithms/sorting/cocktail-shaker-sort/CocktailShakerSort.js b/src/algorithms/sorting/cocktail-shaker-sort/CocktailShakerSort.js index 5e8e2057fe..f9cac4e0a7 100644 --- a/src/algorithms/sorting/cocktail-shaker-sort/CocktailShakerSort.js +++ b/src/algorithms/sorting/cocktail-shaker-sort/CocktailShakerSort.js @@ -34,7 +34,7 @@ export default class CocktailShakerSort extends Sort { if (swapped === false) { break; } - + // Reset the swapped flag so that it can be used in the next stage swapped = false; @@ -48,11 +48,11 @@ export default class CocktailShakerSort extends Sort { swapped = true; } } - + // Move the start point forward by one, // because the item at the start point is already in its correct position. start += 1; - + } return array; } diff --git a/src/data-structures/heap/images/array-representation.jpeg b/src/data-structures/heap/images/array-representation.jpeg index 0a757d7ac0..8914e7102e 100644 Binary files a/src/data-structures/heap/images/array-representation.jpeg and b/src/data-structures/heap/images/array-representation.jpeg differ diff --git a/src/data-structures/heap/images/max-heap.jpeg b/src/data-structures/heap/images/max-heap.jpeg index c818c07f06..c1585d0302 100644 Binary files a/src/data-structures/heap/images/max-heap.jpeg and b/src/data-structures/heap/images/max-heap.jpeg differ diff --git a/src/data-structures/heap/images/min-heap.jpeg b/src/data-structures/heap/images/min-heap.jpeg index 48526d6cdc..646923b2df 100644 Binary files a/src/data-structures/heap/images/min-heap.jpeg and b/src/data-structures/heap/images/min-heap.jpeg differ diff --git a/src/data-structures/queue/images/queue.jpeg b/src/data-structures/queue/images/queue.jpeg index 0e412d550a..579f4d8c83 100644 Binary files a/src/data-structures/queue/images/queue.jpeg and b/src/data-structures/queue/images/queue.jpeg differ diff --git a/src/data-structures/stack/images/stack.jpg b/src/data-structures/stack/images/stack.jpg new file mode 100644 index 0000000000..8c966f276f Binary files /dev/null and b/src/data-structures/stack/images/stack.jpg differ diff --git a/src/data-structures/tree/binary-search-tree/images/binary-search-tree.jpg b/src/data-structures/tree/binary-search-tree/images/binary-search-tree.jpg index f85341d53c..1309e4ee4d 100644 Binary files a/src/data-structures/tree/binary-search-tree/images/binary-search-tree.jpg and b/src/data-structures/tree/binary-search-tree/images/binary-search-tree.jpg differ diff --git a/src/data-structures/tree/images/tree.jpeg b/src/data-structures/tree/images/tree.jpeg index d591972560..c888843d6c 100644 Binary files a/src/data-structures/tree/images/tree.jpeg and b/src/data-structures/tree/images/tree.jpeg differ diff --git a/src/data-structures/trie/images/trie.jpg b/src/data-structures/trie/images/trie.jpg index 8e160b1e8a..001b04f2e7 100644 Binary files a/src/data-structures/trie/images/trie.jpg and b/src/data-structures/trie/images/trie.jpg differ