Skip to content

[pull] master from trekhleb:master #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.ar-AR.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ _اقرأ هذا في لغات أخرى:_
[_Tiếng Việt_](README.vi-VN.md),
[_Deutsch_](README.de-DE.md),
[_Uzbek_](README.uz-UZ.md)
[_עברית_](README.he-IL.md)

☝ ملاحضة هذا المشروع مخصص للاستخدام لأغراض التعلم والبحث
فقط ، و ** ليست ** معدة للاستخدام في **الإنتاج**
Expand Down
1 change: 1 addition & 0 deletions README.de-DE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ _Lies dies in anderen Sprachen:_
[_Українська_](README.uk-UA.md),
[_Arabic_](README.ar-AR.md),
[_Uzbek_](README.uz-UZ.md)
[_עברית_](README.he-IL.md)

_☝ Beachte, dass dieses Projekt nur für Lern- und Forschungszwecke gedacht ist und **nicht** für den produktiven Einsatz verwendet werden soll_

Expand Down
1 change: 1 addition & 0 deletions README.es-ES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ _Léelo en otros idiomas:_
[_Tiếng Việt_](README.vi-VN.md),
[_Deutsch_](README.de-DE.md),
[_Uzbek_](README.uz-UZ.md)
[_עברית_](README.he-IL.md)

*☝ Nótese que este proyecto está pensado con fines de aprendizaje e investigación,
y **no** para ser usado en producción.*
Expand Down
1 change: 1 addition & 0 deletions README.fr-FR.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ _Lisez ceci dans d'autres langues:_
[_Tiếng Việt_](README.vi-VN.md),
[_Deutsch_](README.de-DE.md),
[_Uzbek_](README.uz-UZ.md)
[_עברית_](README.he-IL.md)

## Data Structures

Expand Down
370 changes: 370 additions & 0 deletions README.he-IL.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions README.id-ID.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ _Baca ini dalam bahasa yang lain:_
[_Tiếng Việt_](README.vi-VN.md),
[_Deutsch_](README.de-DE.md),
[_Uzbek_](README.uz-UZ.md)
[_עברית_](README.he-IL.md)

_☝ Perhatikan bahwa proyek ini hanya dimaksudkan untuk tujuan pembelajaran dan riset, dan **tidak** dimaksudkan untuk digunakan sebagai produksi._

Expand Down
1 change: 1 addition & 0 deletions README.it-IT.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ _Leggilo in altre lingue:_
[_Tiếng Việt_](README.vi-VN.md),
[_Deutsch_](README.de-DE.md),
[_Uzbek_](README.uz-UZ.md)
[_עברית_](README.he-IL.md)

*☝ Si noti che questo progetto è destinato ad essere utilizzato solo per l'apprendimento e la ricerca e non è destinato ad essere utilizzato per il commercio.*

Expand Down
1 change: 1 addition & 0 deletions README.ja-JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ _Read this in other languages:_
[_Tiếng Việt_](README.vi-VN.md),
[_Deutsch_](README.de-DE.md),
[_Uzbek_](README.uz-UZ.md)
[_עברית_](README.he-IL.md)

## データ構造

Expand Down
1 change: 1 addition & 0 deletions README.ko-KR.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ _Read this in other languages:_
[_Tiếng Việt_](README.vi-VN.md),
[_Deutsch_](README.de-DE.md),
[_Uzbek_](README.uz-UZ.md)
[_עברית_](README.he-IL.md)

## 자료 구조

Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ _Read this in other languages:_
[_Português_](README.pt-BR.md),
[_Русский_](README.ru-RU.md),
[_Türkçe_](README.tr-TR.md),
[_Italiana_](README.it-IT.md),
[_Italiano_](README.it-IT.md),
[_Bahasa Indonesia_](README.id-ID.md),
[_Українська_](README.uk-UA.md),
[_Arabic_](README.ar-AR.md),
[_Tiếng Việt_](README.vi-VN.md),
[_Deutsch_](README.de-DE.md),
[_Uzbek_](README.uz-UZ.md)
[_Uzbek_](README.uz-UZ.md),
[_עברית_](README.he-IL.md)

*☝ Note that this project is meant to be used for learning and researching purposes
only, and it is **not** meant to be used for production.*
Expand Down Expand Up @@ -143,8 +144,6 @@ a set of rules that precisely define a sequence of operations.
* **Linked Lists**
* `B` [Straight Traversal](src/algorithms/linked-list/traversal)
* `B` [Reverse Traversal](src/algorithms/linked-list/reverse-traversal)
* **Stack**
* `B` [Valid Parentheses](src/algorithms/stack/valid-parentheses) - check if a string has valid parentheses in the correct order
* **Trees**
* `B` [Depth-First Search](src/algorithms/tree/depth-first-search) (DFS)
* `B` [Breadth-First Search](src/algorithms/tree/breadth-first-search) (BFS)
Expand Down Expand Up @@ -187,6 +186,7 @@ a set of rules that precisely define a sequence of operations.
* `B` [Rain Terraces](src/algorithms/uncategorized/rain-terraces) - trapping rain water problem (dynamic programming and brute force versions)
* `B` [Recursive Staircase](src/algorithms/uncategorized/recursive-staircase) - count the number of ways to reach to the top (4 solutions)
* `B` [Best Time To Buy Sell Stocks](src/algorithms/uncategorized/best-time-to-buy-sell-stocks) - divide and conquer and one-pass examples
* `B` [Valid Parentheses](src/algorithms/stack/valid-parentheses) - check if a string has valid parentheses (using stack)
* `A` [N-Queens Problem](src/algorithms/uncategorized/n-queens)
* `A` [Knight's Tour](src/algorithms/uncategorized/knight-tour)

Expand All @@ -199,7 +199,7 @@ algorithm is an abstraction higher than a computer program.
* **Brute Force** - look at all the possibilities and selects the best solution
* `B` [Linear Search](src/algorithms/search/linear-search)
* `B` [Rain Terraces](src/algorithms/uncategorized/rain-terraces) - trapping rain water problem
* `B` [Recursive Staircase](src/algorithms/uncategorized/recursive-staircase) - count the number of ways to reach to the top
* `B` [Recursive Staircase](src/algorithms/uncategorized/recursive-staircase) - count the number of ways to reach the top
* `A` [Maximum Subarray](src/algorithms/sets/maximum-subarray)
* `A` [Travelling Salesman Problem](src/algorithms/graph/travelling-salesman) - shortest possible route that visits each city and returns to the origin city
* `A` [Discrete Fourier Transform](src/algorithms/math/fourier-transform) - decompose a function of time (a signal) into the frequencies that make it up
Expand Down Expand Up @@ -230,7 +230,7 @@ algorithm is an abstraction higher than a computer program.
* `B` [Jump Game](src/algorithms/uncategorized/jump-game)
* `B` [Unique Paths](src/algorithms/uncategorized/unique-paths)
* `B` [Rain Terraces](src/algorithms/uncategorized/rain-terraces) - trapping rain water problem
* `B` [Recursive Staircase](src/algorithms/uncategorized/recursive-staircase) - count the number of ways to reach to the top
* `B` [Recursive Staircase](src/algorithms/uncategorized/recursive-staircase) - count the number of ways to reach the top
* `B` [Seam Carving](src/algorithms/image-processing/seam-carving) - content-aware image resizing algorithm
* `A` [Levenshtein Distance](src/algorithms/string/levenshtein-distance) - minimum edit distance between two sequences
* `A` [Longest Common Subsequence](src/algorithms/sets/longest-common-subsequence) (LCS)
Expand All @@ -243,9 +243,9 @@ algorithm is an abstraction higher than a computer program.
* `A` [Bellman-Ford Algorithm](src/algorithms/graph/bellman-ford) - finding the shortest path to all graph vertices
* `A` [Floyd-Warshall Algorithm](src/algorithms/graph/floyd-warshall) - find the shortest paths between all pairs of vertices
* `A` [Regular Expression Matching](src/algorithms/string/regular-expression-matching)
* **Backtracking** - similarly to brute force, try to generate all possible solutions, but each time you generate next solution you test
if it satisfies all conditions, and only then continue generating subsequent solutions. Otherwise, backtrack, and go on a
different path of finding a solution. Normally the DFS traversal of state-space is being used.
* **Backtracking** - similarly to brute force, try to generate all possible solutions, but each time you generate the next solution, you test
if it satisfies all conditions and only then continue generating subsequent solutions. Otherwise, backtrack and go on a
different path to finding a solution. Normally the DFS traversal of state-space is being used.
* `B` [Jump Game](src/algorithms/uncategorized/jump-game)
* `B` [Unique Paths](src/algorithms/uncategorized/unique-paths)
* `B` [Power Set](src/algorithms/sets/power-set) - all subsets of a set
Expand All @@ -255,8 +255,8 @@ different path of finding a solution. Normally the DFS traversal of state-space
* `A` [Combination Sum](src/algorithms/sets/combination-sum) - find all combinations that form specific sum
* **Branch & Bound** - remember the lowest-cost solution found at each stage of the backtracking
search, and use the cost of the lowest-cost solution found so far as a lower bound on the cost of
a least-cost solution to the problem, in order to discard partial solutions with costs larger than the
lowest-cost solution found so far. Normally BFS traversal in combination with DFS traversal of state-space
a least-cost solution to the problem in order to discard partial solutions with costs larger than the
lowest-cost solution found so far. Normally, BFS traversal in combination with DFS traversal of state-space
tree is being used.

## How to use this repository
Expand Down Expand Up @@ -296,14 +296,14 @@ rm -rf ./node_modules
npm i
```

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.
Also, make sure that you're using the 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.

**Playground**

You may play with data-structures and algorithms in `./src/playground/playground.js` file and write
tests for it in `./src/playground/__test__/playground.test.js`.

Then just simply run the following command to test if your playground code works as expected:
Then just, simply run the following command to test if your playground code works as expected:

```
npm test -- 'playground'
Expand All @@ -319,7 +319,7 @@ npm test -- 'playground'
### Big O Notation

*Big O notation* is used to classify algorithms according to how their running time or space requirements grow as the input size grows.
On the chart below you may find most common orders of growth of algorithms specified in Big O notation.
On the chart below, you may find the most common orders of growth of algorithms specified in Big O notation.

![Big O graphs](./assets/big-o-graph.png)

Expand Down
1 change: 1 addition & 0 deletions README.pl-PL.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ _Read this in other languages:_
[_Tiếng Việt_](README.vi-VN.md),
[_Deutsch_](README.de-DE.md),
[_Uzbek_](README.uz-UZ.md)
[_עברית_](README.he-IL.md)

## Struktury Danych

Expand Down
1 change: 1 addition & 0 deletions README.pt-BR.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ _Leia isto em outros idiomas:_
[_Tiếng Việt_](README.vi-VN.md),
[_Deutsch_](README.de-DE.md),
[_Uzbek_](README.uz-UZ.md)
[_עברית_](README.he-IL.md)

## Estrutura de Dados

Expand Down
1 change: 1 addition & 0 deletions README.ru-RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ _Читать на других языках:_
[_Tiếng Việt_](README.vi-VN.md),
[_Deutsch_](README.de-DE.md),
[_Uzbek_](README.uz-UZ.md)
[_עברית_](README.he-IL.md)

*☝ Замечание: этот репозиторий предназначен для учебно-исследовательских целей (**не** для использования в продакшн-системах).*

Expand Down
1 change: 1 addition & 0 deletions README.tr-TR.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ _Read this in other languages:_
[_Tiếng Việt_](README.vi-VN.md),
[_Deutsch_](README.de-DE.md),
[_Uzbek_](README.uz-UZ.md)
[_עברית_](README.he-IL.md)

*☝ Not, bu proje araştırma ve öğrenme amacı ile yapılmış
olup üretim için **yapılmamıştır**.*
Expand Down
1 change: 1 addition & 0 deletions README.uk-UA.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ _Вивчення матеріалу на інших мовах:_
[_Tiếng Việt_](README.vi-VN.md),
[_Deutsch_](README.de-DE.md),
[_Uzbek_](README.uz-UZ.md)
[_עברית_](README.he-IL.md)

*☝ Зверніть увагу! Даний проект призначений лише для навчальних та дослідницьких цілей, і він **не** призначений для виробництва (продакшн).*

Expand Down
1 change: 1 addition & 0 deletions README.uz-UZ.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ _Read this in other languages:_
[_Tiếng Việt_](README.vi-VN.md),
[_Deutsch_](README.de-DE.md),
[_Uzbek_](README.uz-UZ.md)
[_עברית_](README.he-IL.md)

Yodda tuting, bu loyiha faqat o'quv va tadqiqot maqsadida ishlatilishi
uchun mo'ljallangan va ishlab chiqarishda ishlatilishi **mumkin emas**.
Expand Down
Loading