Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: benqian/javascript-algorithms
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: trekhleb/javascript-algorithms
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.

Commits on Dec 15, 2020

  1. Add GitHub workflow.

    trekhleb committed Dec 15, 2020
    Copy the full SHA
    4094242 View commit details
  2. Delete Travis yml.

    trekhleb committed Dec 15, 2020
    Copy the full SHA
    ead275d View commit details
  3. Copy the full SHA
    39a5fa5 View commit details
  4. Copy the full SHA
    d470fa1 View commit details
  5. Copy the full SHA
    94afab0 View commit details
  6. Copy the full SHA
    ae22574 View commit details
  7. Creating a explanation of Bubblesort in portuguese (trekhleb#423)

    Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
    viniciuslacerda0 and trekhleb authored Dec 15, 2020
    Copy the full SHA
    82cf0e6 View commit details
  8. Copy the full SHA
    802557f View commit details

Commits on Dec 16, 2020

  1. Adding K Nearest Neighbor to ML folder in algorithms with README and …

    …tests (trekhleb#592)
    
    * Updated KNN and README
    
    * Update README.md
    
    * new
    
    * new
    
    * updated tests
    
    * updated knn coverage
    avi09 authored Dec 16, 2020
    Copy the full SHA
    871d20d View commit details
  2. Trim trailing whitespaces.

    trekhleb committed Dec 16, 2020
    Copy the full SHA
    b13291d View commit details
  3. Copy the full SHA
    4623bb9 View commit details
  4. Copy the full SHA
    e105460 View commit details

Commits on Dec 17, 2020

  1. add hillCipher at cryptography section (trekhleb#424)

    * add hillCipher.js and its test case first commit
    
    * add README.md
    
    * update style
    
    Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
    rollingcomma and trekhleb authored Dec 17, 2020
    Copy the full SHA
    9929ab7 View commit details
  2. Copy the full SHA
    d899ae1 View commit details
  3. Add Hill Cipher.

    trekhleb committed Dec 17, 2020
    Copy the full SHA
    52fbc8a View commit details
  4. Add Hill Cipher.

    trekhleb committed Dec 17, 2020
    Copy the full SHA
    38b2b97 View commit details
  5. Add missing LinkedList tests (trekhleb#151)

    Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
    mleg and trekhleb authored Dec 17, 2020
    Copy the full SHA
    07c2108 View commit details
  6. Translate Linked List Traversal to Russian (trekhleb#283)

    Co-authored-by: Askhat <caelestes961@gmail.com>
    askhat-arslanov and Askhat authored Dec 17, 2020
    Copy the full SHA
    431560a View commit details
  7. update desc (trekhleb#371)

    * update desc
    
    * text error
    lvzhenbang authored Dec 17, 2020
    Copy the full SHA
    536f75a View commit details
  8. Update README.md (trekhleb#385)

    Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
    IPRIT and trekhleb authored Dec 17, 2020
    Copy the full SHA
    d87502b View commit details
  9. Translate pt-BR (trekhleb#386)

    Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
    caldasluan and trekhleb authored Dec 17, 2020
    Copy the full SHA
    de1cc0b View commit details
  10. Code style fixes.

    trekhleb committed Dec 17, 2020
    Copy the full SHA
    e220450 View commit details

Commits on Dec 19, 2020

  1. Copy the full SHA
    2c81deb View commit details
  2. Copy the full SHA
    8d52ae5 View commit details
  3. Copy the full SHA
    59666ac View commit details
  4. Copy the full SHA
    610f16f View commit details
  5. Add Euclidean Distance formula (trekhleb#602)

    * Add Matrices section with basic Matrix operations (multiplication, transposition, etc.)
    
    * Add Euclidean Distance algorithm.
    trekhleb authored Dec 19, 2020
    Copy the full SHA
    adda5c5 View commit details
  6. Copy the full SHA
    eb97f73 View commit details
  7. Copy the full SHA
    3e5ddb8 View commit details
  8. Copy the full SHA
    636ebe1 View commit details
  9. Copy the full SHA
    90ec1b7 View commit details
  10. Added kmeans clustering (trekhleb#595)

    * added kmeans
    
    * added kmeans
    
    * added kmeans
    
    Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
    avi09 and trekhleb authored Dec 19, 2020
    Copy the full SHA
    b7cd425 View commit details
  11. Copy the full SHA
    569fd95 View commit details

Commits on Dec 20, 2020

  1. Copy the full SHA
    4bc7273 View commit details
  2. Adding Bahasa Indonesia.

    trekhleb committed Dec 20, 2020
    Copy the full SHA
    c755110 View commit details
  3. Rename the CI workflow file.

    trekhleb committed Dec 20, 2020
    Copy the full SHA
    22abc6f View commit details
  4. Add rail fence cipher (trekhleb#516)

    * Add rail fence cipher encoder & decoder
    
    * Add functions to encode & decode strings using the rail fence cipher method
    * Add unit tests covering empty strings, pair & odd number of characters in the input string, n=3 & n=4
    * Add a README.md for the algorithm
    * Update root README.md to link to the new algorithm
    
    * Rename the CI workflow file.
    
    Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
    jprask and trekhleb authored Dec 20, 2020
    Copy the full SHA
    9641940 View commit details
  5. Copy the full SHA
    71db2d2 View commit details
  6. Add the word "set" to avoid misinterpretation in description (trekhle…

    …b#286)
    
    * Add word to avoid misinterpretation
    
    * Rename the CI workflow file.
    
    Co-authored-by: Sagid Magomedov <sagid-m@yandex-team.ru>
    Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
    3 people authored Dec 20, 2020
    Copy the full SHA
    2794445 View commit details
  7. Add Rail Fence Cipher.

    trekhleb committed Dec 20, 2020
    Copy the full SHA
    cfba1d9 View commit details
  8. Copy the full SHA
    86dea85 View commit details
  9. Copy the full SHA
    521e0a9 View commit details
  10. Copy the full SHA
    fa1f930 View commit details
  11. fix typo (trekhleb#350)

    monkeyWzr authored Dec 20, 2020
    Copy the full SHA
    f617569 View commit details
  12. Copy the full SHA
    e076203 View commit details
  13. Copy the full SHA
    c44bb91 View commit details
  14. Linked List Spanish Traslation (trekhleb#409)

    * Linked List Spanish Traslation
    
    * Rename the CI workflow file.
    
    Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
    Mengeroshi and trekhleb authored Dec 20, 2020
    Copy the full SHA
    148f917 View commit details
  15. Copy the full SHA
    88cef5f View commit details
  16. Copy the full SHA
    4b6c601 View commit details

Commits on Dec 22, 2020

  1. Bump node-notifier from 8.0.0 to 8.0.1 (trekhleb#607)

    Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
    - [Release notes](https://github.com/mikaelbr/node-notifier/releases)
    - [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
    - [Commits](mikaelbr/node-notifier@v8.0.0...v8.0.1)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 22, 2020
    Copy the full SHA
    3787117 View commit details
Showing with 24,292 additions and 6,453 deletions.
  1. +3 −0 .editorconfig
  2. +6 −0 .eslintrc
  3. +35 −0 .github/workflows/CI.yml
  4. +1 −0 .husky/.gitignore
  5. +5 −0 .husky/pre-commit
  6. +0 −5 .huskyrc.json
  7. +1 −0 .npmrc
  8. +1 −0 .nvmrc
  9. +0 −13 .travis.yml
  10. +28 −7 BACKERS.md
  11. +328 −0 README.ar-AR.md
  12. +338 −0 README.de-DE.md
  13. +22 −13 README.es-ES.md
  14. +11 −2 README.fr-FR.md
  15. +370 −0 README.he-IL.md
  16. +311 −0 README.id-ID.md
  17. +27 −18 README.it-IT.md
  18. +16 −7 README.ja-JP.md
  19. +17 −8 README.ko-KR.md
  20. +99 −37 README.md
  21. +33 −24 README.pl-PL.md
  22. +144 −128 README.pt-BR.md
  23. +37 −8 README.ru-RU.md
  24. +45 −33 README.tr-TR.md
  25. +312 −0 README.uk-UA.md
  26. +359 −0 README.uz-UZ.md
  27. +329 −0 README.vi-VN.md
  28. +12 −3 README.zh-CN.md
  29. +12 −3 README.zh-TW.md
  30. +13 −1 jest.config.js
  31. +12,199 −5,657 package-lock.json
  32. +24 −20 package.json
  33. +3 −0 src/algorithms/cryptography/caesar-cipher/README.md
  34. +29 −0 src/algorithms/cryptography/caesar-cipher/README.ru-RU.md
  35. +96 −0 src/algorithms/cryptography/hill-cipher/README.md
  36. +46 −0 src/algorithms/cryptography/hill-cipher/_test_/hillCipher.test.js
  37. +87 −0 src/algorithms/cryptography/hill-cipher/hillCipher.js
  38. +28 −0 src/algorithms/cryptography/rail-fence-cipher/README.md
  39. +43 −0 src/algorithms/cryptography/rail-fence-cipher/__test__/railFenceCipher.test.js
  40. +242 −0 src/algorithms/cryptography/rail-fence-cipher/railFenceCipher.js
  41. +2 −2 src/algorithms/graph/breadth-first-search/README.md
  42. +16 −0 src/algorithms/graph/dijkstra/README.ko-KR.md
  43. +3 −0 src/algorithms/graph/dijkstra/README.md
  44. +29 −0 src/algorithms/graph/kruskal/README.ko-KR.md
  45. +3 −0 src/algorithms/graph/kruskal/README.md
  46. +509 −0 src/algorithms/image-processing/seam-carving/README.md
  47. +509 −0 src/algorithms/image-processing/seam-carving/README.ru-RU.md
  48. +85 −0 src/algorithms/image-processing/seam-carving/__tests__/resizeImageWidth.node.js
  49. BIN src/algorithms/image-processing/seam-carving/__tests__/test-image-after.png
  50. BIN src/algorithms/image-processing/seam-carving/__tests__/test-image-before.png
  51. +253 −0 src/algorithms/image-processing/seam-carving/resizeImageWidth.js
  52. +39 −0 src/algorithms/image-processing/utils/imageData.js
  53. +4 −0 src/algorithms/linked-list/reverse-traversal/README.md
  54. +23 −0 src/algorithms/linked-list/reverse-traversal/README.pt-BR.md
  55. +19 −0 src/algorithms/linked-list/reverse-traversal/README.zh-CN.md
  56. +7 −2 src/algorithms/linked-list/traversal/README.md
  57. +24 −0 src/algorithms/linked-list/traversal/README.pt-BR.md
  58. +19 −0 src/algorithms/linked-list/traversal/README.ru-RU.md
  59. +19 −0 src/algorithms/linked-list/traversal/README.zh-CN.md
  60. +103 −0 src/algorithms/math/binary-floating-point/README.md
  61. +32 −0 src/algorithms/math/binary-floating-point/__tests__/bitsToFloat.test.js
  62. +20 −0 src/algorithms/math/binary-floating-point/__tests__/floatAsBinaryString.test.js
  63. +119 −0 src/algorithms/math/binary-floating-point/bitsToFloat.js
  64. +61 −0 src/algorithms/math/binary-floating-point/floatAsBinaryString.js
  65. BIN ...lgorithms/math/binary-floating-point/images/02-half-precision-floating-point-number-explained.png
  66. BIN src/algorithms/math/binary-floating-point/images/03-scientific-notation.png
  67. +71 −0 src/algorithms/math/binary-floating-point/testCases.js
  68. +3 −2 src/algorithms/math/bits/README.md
  69. +236 −0 src/algorithms/math/bits/README.zh-CN.md
  70. +36 −0 src/algorithms/math/euclidean-distance/README.md
  71. +23 −0 src/algorithms/math/euclidean-distance/__tests__/euclideanDistance.test.js
  72. +28 −0 src/algorithms/math/euclidean-distance/euclideanDistance.js
  73. +32 −0 src/algorithms/math/factorial/README.ka-GE.md
  74. +1 −1 src/algorithms/math/factorial/README.md
  75. +38 −0 src/algorithms/math/factorial/README.tr-TR.md
  76. +33 −0 src/algorithms/math/factorial/README.uk-UA.md
  77. +2 −1 src/algorithms/math/fibonacci/README.fr-FR.md
  78. +20 −0 src/algorithms/math/fibonacci/README.ka-GE.md
  79. +3 −1 src/algorithms/math/fibonacci/README.md
  80. +23 −0 src/algorithms/math/fibonacci/README.zh-CN.md
  81. +0 −2 src/algorithms/math/fibonacci/__test__/fibonacciNth.test.js
  82. +8 −9 src/algorithms/math/is-power-of-two/README.md
  83. +309 −0 src/algorithms/math/matrix/Matrix.js
  84. +63 −0 src/algorithms/math/matrix/README.md
  85. +455 −0 src/algorithms/math/matrix/__tests__/Matrix.test.js
  86. +3 −0 src/algorithms/math/prime-factors/README.md
  87. +38 −0 src/algorithms/math/prime-factors/README.zh-CN.md
  88. +40 −0 src/algorithms/ml/k-means/README.md
  89. +35 −0 src/algorithms/ml/k-means/README.pt-BR.md
  90. +40 −0 src/algorithms/ml/k-means/__test__/kMeans.test.js
  91. +85 −0 src/algorithms/ml/k-means/kMeans.js
  92. +44 −0 src/algorithms/ml/knn/README.md
  93. +44 −0 src/algorithms/ml/knn/README.pt-BR.md
  94. +71 −0 src/algorithms/ml/knn/__test__/knn.test.js
  95. +60 −0 src/algorithms/ml/knn/kNN.js
  96. +27 −0 src/algorithms/search/binary-search/README.es-ES.md
  97. +12 −8 src/algorithms/search/binary-search/README.md
  98. +23 −0 src/algorithms/search/binary-search/README.pt-BR.md
  99. +1 −1 src/algorithms/search/binary-search/binarySearch.js
  100. +4 −0 src/algorithms/search/linear-search/README.md
  101. +19 −0 src/algorithms/search/linear-search/README.pt-BR.md
  102. +15 −17 src/algorithms/sets/combinations/README.md
  103. BIN src/algorithms/sets/combinations/images/combinations-overview.jpg
  104. BIN src/algorithms/sets/combinations/images/combinations-with-repetitions.jpg
  105. BIN src/algorithms/sets/combinations/images/combinations-without-repetitions.jpg
  106. BIN src/algorithms/sets/combinations/images/overview.png
  107. +17 −0 src/algorithms/sets/longest-common-subsequence/__test__/longestCommonSubsequenceRecursive.test.js
  108. +36 −0 src/algorithms/sets/longest-common-subsequence/longestCommonSubsequenceRecursive.js
  109. +12 −5 src/algorithms/sets/maximum-subarray/README.md
  110. +1 −1 src/algorithms/sets/maximum-subarray/__test__/bfMaximumSubarray.test.js
  111. +16 −0 src/algorithms/sets/maximum-subarray/__test__/dcMaximumSubarraySum.test.js
  112. +1 −1 src/algorithms/sets/maximum-subarray/__test__/dpMaximumSubarray.test.js
  113. +33 −0 src/algorithms/sets/maximum-subarray/dcMaximumSubarraySum.js
  114. +10 −12 src/algorithms/sets/permutations/README.md
  115. BIN src/algorithms/sets/permutations/images/overview.png
  116. BIN src/algorithms/sets/permutations/images/permutations-overview.jpeg
  117. BIN src/algorithms/sets/permutations/images/permutations-with-repetitions.jpg
  118. BIN src/algorithms/sets/permutations/images/permutations-without-repetitions.jpg
  119. +49 −11 src/algorithms/sets/power-set/README.md
  120. +28 −0 src/algorithms/sets/power-set/__test__/caPowerSet.test.js
  121. +37 −0 src/algorithms/sets/power-set/caPowerSet.js
  122. +8 −5 src/algorithms/sorting/bubble-sort/README.md
  123. +20 −0 src/algorithms/sorting/bubble-sort/README.pt-BR.md
  124. +46 −0 src/algorithms/sorting/bucket-sort/BucketSort.js
  125. +35 −0 src/algorithms/sorting/bucket-sort/README.md
  126. +33 −0 src/algorithms/sorting/bucket-sort/__test__/BucketSort.test.js
  127. BIN src/algorithms/sorting/bucket-sort/images/bucket_sort_1.png
  128. BIN src/algorithms/sorting/bucket-sort/images/bucket_sort_2.png
  129. +3 −0 src/algorithms/sorting/counting-sort/README.md
  130. +70 −0 src/algorithms/sorting/counting-sort/README.pt-br.md
  131. +3 −0 src/algorithms/sorting/heap-sort/README.md
  132. +20 −0 src/algorithms/sorting/heap-sort/README.pt-BR.md
  133. +3 −3 src/algorithms/sorting/insertion-sort/InsertionSort.js
  134. +3 −0 src/algorithms/sorting/insertion-sort/README.md
  135. +22 −0 src/algorithms/sorting/insertion-sort/README.pt-BR.md
  136. +4 −4 src/algorithms/sorting/insertion-sort/__test__/InsertionSort.test.js
  137. +22 −0 src/algorithms/sorting/merge-sort/README.ko-KR.md
  138. +16 −12 src/algorithms/sorting/merge-sort/README.md
  139. +38 −0 src/algorithms/sorting/merge-sort/README.pt-BR.md
  140. +1 −1 src/algorithms/sorting/quick-sort/QuickSortInPlace.js
  141. +4 −0 src/algorithms/sorting/quick-sort/README.md
  142. +39 −0 src/algorithms/sorting/quick-sort/README.pt-BR.md
  143. +27 −0 src/algorithms/sorting/quick-sort/README.zh-CN.md
  144. +22 −19 src/algorithms/sorting/radix-sort/README.md
  145. +48 −0 src/algorithms/sorting/radix-sort/README.pt-BR.md
  146. BIN src/algorithms/sorting/radix-sort/images/radix-sort.png
  147. +3 −0 src/algorithms/sorting/selection-sort/README.md
  148. +20 −0 src/algorithms/sorting/selection-sort/README.pt-BR.md
  149. +3 −0 src/algorithms/sorting/shell-sort/README.md
  150. +60 −0 src/algorithms/sorting/shell-sort/README.pt-BR.md
  151. +44 −0 src/algorithms/stack/valid-parentheses/README.md
  152. +23 −0 src/algorithms/stack/valid-parentheses/__test__/validParentheses.test.js
  153. +42 −0 src/algorithms/stack/valid-parentheses/validParentheses.js
  154. +143 −0 src/algorithms/statistics/weighted-random/README.md
  155. +64 −0 src/algorithms/statistics/weighted-random/__test__/weightedRandom.test.js
  156. BIN src/algorithms/statistics/weighted-random/images/cover.png
  157. +52 −0 src/algorithms/statistics/weighted-random/weightedRandom.js
  158. +1 −1 src/algorithms/string/knuth-morris-pratt/knuthMorrisPratt.js
  159. +1 −1 src/algorithms/string/levenshtein-distance/README.md
  160. +2 −0 src/algorithms/string/longest-common-substring/__test__/longestCommonSubstring.test.js
  161. +2 −0 src/algorithms/string/longest-common-substring/longestCommonSubstring.js
  162. +29 −0 src/algorithms/string/palindrome/README.md
  163. +15 −0 src/algorithms/string/palindrome/__test__/isPalindrome.test.js
  164. +19 −0 src/algorithms/string/palindrome/isPalindrome.js
  165. +3 −3 src/algorithms/tree/breadth-first-search/breadthFirstSearch.js
  166. +107 −0 src/algorithms/uncategorized/best-time-to-buy-sell-stocks/README.md
  167. +48 −0 ...s/uncategorized/best-time-to-buy-sell-stocks/__tests__/accumulatorBestTimeToBuySellStocks.test.js
  168. +48 −0 ...algorithms/uncategorized/best-time-to-buy-sell-stocks/__tests__/dpBestTimeToBuySellStocks.test.js
  169. +48 −0 ...algorithms/uncategorized/best-time-to-buy-sell-stocks/__tests__/dqBestTimeToBuySellStocks.test.js
  170. +48 −0 ...ms/uncategorized/best-time-to-buy-sell-stocks/__tests__/peakvalleyBestTimeToBuySellStocks.test.js
  171. +20 −0 src/algorithms/uncategorized/best-time-to-buy-sell-stocks/accumulatorBestTimeToBuySellStocks.js
  172. +25 −0 src/algorithms/uncategorized/best-time-to-buy-sell-stocks/dpBestTimeToBuySellStocks.js
  173. +42 −0 src/algorithms/uncategorized/best-time-to-buy-sell-stocks/dqBestTimeToBuySellStocks.js
  174. +35 −0 src/algorithms/uncategorized/best-time-to-buy-sell-stocks/peakvalleyBestTimeToBuySellStocks.js
  175. +1 −1 src/algorithms/uncategorized/n-queens/README.md
  176. +20 −19 src/data-structures/bloom-filter/README.md
  177. +2 −2 src/data-structures/bloom-filter/README.pt-BR.md
  178. +1 −1 src/data-structures/bloom-filter/README.ru-RU.md
  179. +54 −0 src/data-structures/bloom-filter/README.uk-UA.md
  180. +78 −0 src/data-structures/disjoint-set/DisjointSetAdhoc.js
  181. +13 −8 src/data-structures/disjoint-set/README.md
  182. +5 −5 src/data-structures/disjoint-set/README.pt-BR.md
  183. +22 −0 src/data-structures/disjoint-set/README.uk-UA.md
  184. +50 −0 src/data-structures/disjoint-set/__test__/DisjointSetAdhoc.test.js
  185. +104 −0 src/data-structures/doubly-linked-list/README.es-ES.md
  186. +6 −4 src/data-structures/doubly-linked-list/README.ja-JP.md
  187. +6 −4 src/data-structures/doubly-linked-list/README.ko-KR.md
  188. +27 −23 src/data-structures/doubly-linked-list/README.md
  189. +9 −7 src/data-structures/doubly-linked-list/README.pt-BR.md
  190. +11 −9 src/data-structures/doubly-linked-list/README.ru-RU.md
  191. +109 −0 src/data-structures/doubly-linked-list/README.uk-UA.md
  192. +10 −8 src/data-structures/doubly-linked-list/README.zh-CN.md
  193. BIN src/data-structures/doubly-linked-list/images/doubly-linked-list.jpeg
  194. +25 −0 src/data-structures/graph/README.fr-FR.md
  195. +18 −13 src/data-structures/graph/README.md
  196. +3 −1 src/data-structures/graph/README.pt-BR.md
  197. +4 −2 src/data-structures/graph/README.ru-RU.md
  198. +24 −0 src/data-structures/graph/README.uk-UA.md
  199. +2 −2 src/data-structures/graph/README.zh-CN.md
  200. BIN src/data-structures/graph/images/graph.jpeg
  201. +4 −2 src/data-structures/hash-table/README.fr-FR.md
  202. +5 −3 src/data-structures/hash-table/README.ja-JP.md
  203. +27 −0 src/data-structures/hash-table/README.ko-KR.md
  204. +16 −12 src/data-structures/hash-table/README.md
  205. +6 −4 src/data-structures/hash-table/README.pt-BR.md
  206. +7 −3 src/data-structures/hash-table/README.ru-RU.md
  207. +29 −0 src/data-structures/hash-table/README.uk-UA.md
  208. +8 −4 src/data-structures/hash-table/README.zh-CN.md
  209. BIN src/data-structures/hash-table/images/collision-resolution.jpeg
  210. BIN src/data-structures/hash-table/images/hash-table.jpeg
  211. +1 −1 src/data-structures/heap/Heap.js
  212. +115 −0 src/data-structures/heap/MaxHeapAdhoc.js
  213. +117 −0 src/data-structures/heap/MinHeapAdhoc.js
  214. +6 −2 src/data-structures/heap/README.fr-FR.md
  215. +6 −2 src/data-structures/heap/README.ja-JP.md
  216. +23 −0 src/data-structures/heap/README.ko-KR.md
  217. +43 −5 src/data-structures/heap/README.md
  218. +6 −2 src/data-structures/heap/README.pt-BR.md
  219. +6 −2 src/data-structures/heap/README.ru-RU.md
  220. +22 −0 src/data-structures/heap/README.tr-TR.md
  221. +25 −0 src/data-structures/heap/README.uk-UA.md
  222. +23 −19 src/data-structures/heap/README.zh-CN.md
  223. +91 −0 src/data-structures/heap/__test__/MaxHeapAdhoc.test.js
  224. +91 −0 src/data-structures/heap/__test__/MinHeapAdhoc.test.js
  225. BIN src/data-structures/heap/images/array-representation.jpeg
  226. BIN src/data-structures/heap/images/max-heap.jpeg
  227. BIN src/data-structures/heap/images/min-heap.jpeg
  228. +35 −1 src/data-structures/linked-list/LinkedList.js
  229. +165 −0 src/data-structures/linked-list/README.es-ES.md
  230. +4 −2 src/data-structures/linked-list/README.ja-JP.md
  231. +5 −3 src/data-structures/linked-list/README.ko-KR.md
  232. +26 −19 src/data-structures/linked-list/README.md
  233. +9 −7 src/data-structures/linked-list/README.pt-BR.md
  234. +5 −3 src/data-structures/linked-list/README.ru-RU.md
  235. +161 −0 src/data-structures/linked-list/README.tr-TR.md
  236. +147 −0 src/data-structures/linked-list/README.uk-UA.md
  237. +155 −0 src/data-structures/linked-list/README.vi-VN.md
  238. +5 −3 src/data-structures/linked-list/README.zh-CN.md
  239. +37 −1 src/data-structures/linked-list/__test__/LinkedList.test.js
  240. BIN src/data-structures/linked-list/images/linked-list.jpeg
  241. +153 −0 src/data-structures/lru-cache/LRUCache.js
  242. +53 −0 src/data-structures/lru-cache/LRUCacheOnMap.js
  243. +51 −0 src/data-structures/lru-cache/README.ko-KR.md
  244. +54 −0 src/data-structures/lru-cache/README.md
  245. +150 −0 src/data-structures/lru-cache/__test__/LRUCache.test.js
  246. +148 −0 src/data-structures/lru-cache/__test__/LRUCacheOnMap.test.js
  247. BIN src/data-structures/lru-cache/images/lru-cache.jpg
  248. +12 −0 src/data-structures/priority-queue/README.ko-KR.md
  249. +11 −9 src/data-structures/priority-queue/README.md
  250. +4 −4 src/data-structures/priority-queue/README.pt-BR.md
  251. +21 −0 src/data-structures/priority-queue/README.uk-UA.md
  252. +1 −1 src/data-structures/queue/Queue.js
  253. +3 −1 src/data-structures/queue/README.fr-FR.md
  254. +3 −1 src/data-structures/queue/README.ja-JP.md
  255. +23 −0 src/data-structures/queue/README.ko-KR.md
  256. +20 −16 src/data-structures/queue/README.md
  257. +3 −1 src/data-structures/queue/README.pt-BR.md
  258. +5 −3 src/data-structures/queue/README.ru-RU.md
  259. +21 −0 src/data-structures/queue/README.uk-UA.md
  260. +22 −0 src/data-structures/queue/README.vi-VN.md
  261. +4 −2 src/data-structures/queue/README.zh-CN.md
  262. BIN src/data-structures/queue/images/queue.jpeg
  263. +3 −1 src/data-structures/stack/README.fr-FR.md
  264. +3 −1 src/data-structures/stack/README.ja-JP.md
  265. +26 −0 src/data-structures/stack/README.ko-KR.md
  266. +14 −10 src/data-structures/stack/README.md
  267. +7 −5 src/data-structures/stack/README.pt-BR.md
  268. +4 −2 src/data-structures/stack/README.ru-RU.md
  269. +25 −0 src/data-structures/stack/README.uk-UA.md
  270. +27 −0 src/data-structures/stack/README.vi-VN.md
  271. +3 −1 src/data-structures/stack/README.zh-CN.md
  272. BIN src/data-structures/stack/images/stack.jpeg
  273. BIN src/data-structures/stack/images/stack.jpg
  274. +13 −11 src/data-structures/tree/README.md
  275. +4 −2 src/data-structures/tree/README.pt-BR.md
  276. +4 −2 src/data-structures/tree/README.zh-CN.md
  277. +29 −27 src/data-structures/tree/binary-search-tree/README.md
  278. +10 −9 src/data-structures/tree/binary-search-tree/README.pt-BR.md
  279. BIN src/data-structures/tree/binary-search-tree/images/binary-search-tree.jpg
  280. BIN src/data-structures/tree/images/tree.jpeg
  281. +19 −0 src/data-structures/trie/README.ko-KO.md
  282. +17 −13 src/data-structures/trie/README.md
  283. +6 −4 src/data-structures/trie/README.pt-BR.md
  284. +3 −1 src/data-structures/trie/README.ru-RU.md
  285. +27 −0 src/data-structures/trie/README.uk-UA.md
  286. +4 −2 src/data-structures/trie/README.zh-CN.md
  287. BIN src/data-structures/trie/images/trie.jpg
  288. +5 −2 src/playground/__test__/playground.test.js
  289. +12 −1 src/playground/playground.js
  290. +1 −0 src/utils/comparator/Comparator.js
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# @see: https://editorconfig.org/
root = true

[*]
@@ -6,3 +7,5 @@ insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
quote_type = single
6 changes: 6 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -11,5 +11,11 @@
"class-methods-use-this": "off",
"arrow-body-style": "off",
"no-loop-func": "off"
},
"ignorePatterns": ["*.md", "*.png", "*.jpeg", "*.jpg"],
"settings": {
"react": {
"version": "18.2.0"
}
}
}
35 changes: 35 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 16.x ]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm i

- name: Run linting
run: npm run lint

- name: Run tests
run: npm run coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
# npm run test
5 changes: 0 additions & 5 deletions .huskyrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.15.0
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

35 changes: 28 additions & 7 deletions BACKERS.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,48 @@
# Project Backers

> You may support this project via ❤️️ [GitHub](https://github.com/sponsors/trekhleb) or ❤️️ [Patreon](https://www.patreon.com/trekhleb).
> You may support this project via ❤️️ [GitHub](https://github.com/sponsors/trekhleb) or ❤️️ [Patreon](https://www.patreon.com/trekhleb).
## `O(2ⁿ)` Backers

`null`

## `O(n²)` Backers

`null`

## `O(n×log(n))` Backers

`null`

<!--
<table>
<tr>
<td align="center">
<a href="[PROFILE_URL]">
<img
src="[PROFILE_IMG_SRC]"
width="50"
height="50"
/>
</a>
<br />
<a href="[PROFILE_URL]">[PROFILE_NAME]</a>
</td>
</tr>
</table>
-->

<!--
<ul>
<li>
<a href="https://github.com/bullwinkle">
<a href="[PROFILE_URL]">
<img
src="https://avatars1.githubusercontent.com/u/3613558?s=60&amp;v=4"
src="[PROFILE_IMG_SRC]"
width="30"
height="30"
/></a>
&thinsp;
<a href="https://github.com/bullwinkle">bullwinkle</a>
<a href="[PROFILE_URL]">[PROFILE_NAME]</a>
</li>
</ul>

-->
Loading