Skip to content

Commit 8cc0200

Browse files
authored
Merge branch 'trekhleb:master' into fix-graph-reverse
2 parents 00b1a38 + bbbfd32 commit 8cc0200

119 files changed

Lines changed: 14100 additions & 2690 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"settings": {
1616
"react": {
17-
"version": "latest"
17+
"version": "18.2.0"
1818
}
1919
}
2020
}

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node-version: [ 14.x ]
14+
node-version: [ 16.x ]
1515

1616
steps:
1717
- name: Checkout repository

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v14
1+
v16.15.0

BACKERS.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,24 @@
1414

1515
`null`
1616

17+
<!--
18+
<table>
19+
<tr>
20+
<td align="center">
21+
<a href="[PROFILE_URL]">
22+
<img
23+
src="[PROFILE_IMG_SRC]"
24+
width="50"
25+
height="50"
26+
/>
27+
</a>
28+
<br />
29+
<a href="[PROFILE_URL]">[PROFILE_NAME]</a>
30+
</td>
31+
</tr>
32+
</table>
33+
-->
34+
1735
<!--
1836
<ul>
1937
<li>

README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# JavaScript Algorithms and Data Structures
22

3-
> 🇺🇦 UKRAINE [IS BEING ATTACKED](https://twitter.com/MFA_Ukraine) BY RUSSIAN ARMY. CIVILIANS ARE GETTING KILLED. RESIDENTIAL AREAS ARE GETTING BOMBED.
3+
> 🇺🇦 UKRAINE [IS BEING ATTACKED](https://war.ukraine.ua/) BY RUSSIAN ARMY. CIVILIANS ARE GETTING KILLED. RESIDENTIAL AREAS ARE GETTING BOMBED.
44
> - Help Ukraine via [National Bank of Ukraine](https://bank.gov.ua/en/news/all/natsionalniy-bank-vidkriv-spetsrahunok-dlya-zboru-koshtiv-na-potrebi-armiyi)
55
> - Help Ukraine via [SaveLife](https://savelife.in.ua/en/donate-en/) fund
6-
> - More info on [war.ukraine.ua](https://war.ukraine.ua/)
6+
> - More info on [war.ukraine.ua](https://war.ukraine.ua/) and [MFA of Ukraine](https://twitter.com/MFA_Ukraine)
7+
8+
<hr/>
79

810
[![CI](https://github.com/trekhleb/javascript-algorithms/workflows/CI/badge.svg)](https://github.com/trekhleb/javascript-algorithms/actions?query=workflow%3ACI+branch%3Amaster)
911
[![codecov](https://codecov.io/gh/trekhleb/javascript-algorithms/branch/master/graph/badge.svg)](https://codecov.io/gh/trekhleb/javascript-algorithms)
@@ -25,7 +27,7 @@ _Read this in other languages:_
2527
[_Español_](README.es-ES.md),
2628
[_Português_](README.pt-BR.md),
2729
[_Русский_](README.ru-RU.md),
28-
[_Türk_](README.tr-TR.md),
30+
[_Türkçe_](README.tr-TR.md),
2931
[_Italiana_](README.it-IT.md),
3032
[_Bahasa Indonesia_](README.id-ID.md),
3133
[_Українська_](README.uk-UA.md),
@@ -60,8 +62,9 @@ the data.
6062
* `A` [Segment Tree](src/data-structures/tree/segment-tree) - with min/max/sum range queries examples
6163
* `A` [Fenwick Tree](src/data-structures/tree/fenwick-tree) (Binary Indexed Tree)
6264
* `A` [Graph](src/data-structures/graph) (both directed and undirected)
63-
* `A` [Disjoint Set](src/data-structures/disjoint-set)
65+
* `A` [Disjoint Set](src/data-structures/disjoint-set) - a union–find data structure or merge–find set
6466
* `A` [Bloom Filter](src/data-structures/bloom-filter)
67+
* `A` [LRU Cache](src/data-structures/lru-cache/) - Least Recently Used (LRU) cache
6568

6669
## Algorithms
6770

@@ -97,7 +100,7 @@ a set of rules that precisely define a sequence of operations.
97100
* **Sets**
98101
* `B` [Cartesian Product](src/algorithms/sets/cartesian-product) - product of multiple sets
99102
* `B` [Fisher–Yates Shuffle](src/algorithms/sets/fisher-yates) - random permutation of a finite sequence
100-
* `A` [Power Set](src/algorithms/sets/power-set) - all subsets of a set (bitwise and backtracking solutions)
103+
* `A` [Power Set](src/algorithms/sets/power-set) - all subsets of a set (bitwise, backtracking, and cascading solutions)
101104
* `A` [Permutations](src/algorithms/sets/permutations) (with and without repetitions)
102105
* `A` [Combinations](src/algorithms/sets/combinations) (with and without repetitions)
103106
* `A` [Longest Common Subsequence](src/algorithms/sets/longest-common-subsequence) (LCS)
@@ -130,6 +133,7 @@ a set of rules that precisely define a sequence of operations.
130133
* `B` [Shellsort](src/algorithms/sorting/shell-sort)
131134
* `B` [Counting Sort](src/algorithms/sorting/counting-sort)
132135
* `B` [Radix Sort](src/algorithms/sorting/radix-sort)
136+
* `B` [Bucket Sort](src/algorithms/sorting/bucket-sort)
133137
* **Linked Lists**
134138
* `B` [Straight Traversal](src/algorithms/linked-list/traversal)
135139
* `B` [Reverse Traversal](src/algorithms/linked-list/reverse-traversal)
@@ -277,14 +281,14 @@ npm test -- 'LinkedList'
277281

278282
**Troubleshooting**
279283

280-
In case if linting or testing is failing try to delete the `node_modules` folder and re-install npm packages:
284+
If linting or testing is failing, try to delete the `node_modules` folder and re-install npm packages:
281285

282286
```
283287
rm -rf ./node_modules
284288
npm i
285289
```
286290

287-
Also make sure that you're using a correct Node version (`>=14.16.0`). If you're using [nvm](https://github.com/nvm-sh/nvm) for Node version management you may run `nvm use` from the root folder of the project and the correct version will be picked up.
291+
Also make sure that you're using a correct Node version (`>=16`). If you're using [nvm](https://github.com/nvm-sh/nvm) for Node version management you may run `nvm use` from the root folder of the project and the correct version will be picked up.
288292

289293
**Playground**
290294

@@ -301,7 +305,8 @@ npm test -- 'playground'
301305

302306
### References
303307

304-
[▶ Data Structures and Algorithms on YouTube](https://www.youtube.com/playlist?list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8)
308+
- [▶ Data Structures and Algorithms on YouTube](https://www.youtube.com/playlist?list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8)
309+
- [✍🏻 Data Structure Sketches](https://okso.app/showcase/data-structures)
305310

306311
### Big O Notation
307312

@@ -357,6 +362,10 @@ Below is the list of some of the most used Big O notations and their performance
357362

358363
> You may support this project via ❤️️ [GitHub](https://github.com/sponsors/trekhleb) or ❤️️ [Patreon](https://www.patreon.com/trekhleb).
359364
360-
[Folks who are backing this project](https://github.com/trekhleb/javascript-algorithms/blob/master/BACKERS.md) `∑ = 0`
365+
[Folks who are backing this project](https://github.com/trekhleb/javascript-algorithms/blob/master/BACKERS.md) `∑ = 1`
366+
367+
## Author
368+
369+
[@trekhleb](https://trekhleb.dev)
361370

362-
> ℹ️ A few more [projects](https://trekhleb.dev/projects/) and [articles](https://trekhleb.dev/blog/) about JavaScript and algorithms on [trekhleb.dev](https://trekhleb.dev)
371+
A few more [projects](https://trekhleb.dev/projects/) and [articles](https://trekhleb.dev/blog/) about JavaScript and algorithms on [trekhleb.dev](https://trekhleb.dev)

0 commit comments

Comments
 (0)