Skip to content

Commit b13291d

Browse files
committedDec 16, 2020
Trim trailing whitespaces.
1 parent 871d20d commit b13291d

12 files changed

+77
-75
lines changed
 

‎.editorconfig

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# @see: https://editorconfig.org/
12
root = true
23

34
[*]
@@ -6,3 +7,4 @@ insert_final_newline = true
67
charset = utf-8
78
indent_style = space
89
indent_size = 2
10+
trim_trailing_whitespace = true

‎README.es-ES.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Este repositorio contiene ejemplos basados en JavaScript de muchos
77
algoritmos y estructuras de datos populares.
88

9-
Cada algoritmo y estructura de datos tiene su propio LÉAME con explicaciones relacionadas y
9+
Cada algoritmo y estructura de datos tiene su propio LÉAME con explicaciones relacionadas y
1010
enlaces para lecturas adicionales (incluyendo algunas a vídeos de YouTube).
1111

1212
_Léelo en otros idiomas:_
@@ -54,7 +54,7 @@ los datos.
5454

5555
## Algoritmos
5656

57-
Un algoritmo es una especificación inequívoca de cómo resolver una clase de problemas. Es un conjunto de reglas que
57+
Un algoritmo es una especificación inequívoca de cómo resolver una clase de problemas. Es un conjunto de reglas que
5858
definen con precisión una secuencia de operaciones.
5959

6060
`P` - Principiante, `A` - Avanzado
@@ -231,7 +231,7 @@ npm test -- 'LinkedList'
231231

232232
**Campo de juegos**
233233

234-
Puede jugar con estructuras de datos y algoritmos en el archivo `./src/playground/playground.js` y escribir
234+
Puede jugar con estructuras de datos y algoritmos en el archivo `./src/playground/playground.js` y escribir
235235
pruebas para ello en `./src/playground/__test__/playground.test.js`.
236236

237237
A continuación, simplemente ejecute el siguiente comando para comprobar si el código funciona como se espera:
@@ -254,7 +254,7 @@ Orden de crecimiento de los algoritmos especificados en la notación O grande.
254254

255255
Fuente: [Big O Cheat Sheet](http://bigocheatsheet.com/).
256256

257-
A continuación se muestra la lista de algunas de las notaciones de Big O más utilizadas y sus comparaciones de rendimiento
257+
A continuación se muestra la lista de algunas de las notaciones de Big O más utilizadas y sus comparaciones de rendimiento
258258
frente a diferentes tamaños de los datos de entrada.
259259

260260
| Notación O grande | Cálculos para 10 elementos | Cálculos para 100 elementos | Cálculos para 1000 elementos |

‎README.it-IT.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@ un insieme di regole che definiscono con precisione una sequenza di operazioni.
5656

5757
* **Matematica**
5858
* `P` [Manipolazione dei Bit](src/algorithms/math/bits) - set/get/update/clear bits, moltiplicazione/divisione per due, gestire numeri negativi etc.
59-
* `P` [Fattoriale](src/algorithms/math/factorial)
59+
* `P` [Fattoriale](src/algorithms/math/factorial)
6060
* `P` [Numeri di Fibonacci](src/algorithms/math/fibonacci) - classico e forma chiusa
6161
* `P` [Test di Primalità](src/algorithms/math/primality-test) (metodo del divisore)
6262
* `P` [Algoritmo di Euclide](src/algorithms/math/euclidean-algorithm) - trova il massimo comune divisore (MCD)
6363
* `P` [Minimo Comune Multiplo](src/algorithms/math/least-common-multiple) (MCM)
6464
* `P` [Crivello di Eratostene](src/algorithms/math/sieve-of-eratosthenes) - trova i numeri i primi fino al limite indicato
6565
* `P` [Potenza di due](src/algorithms/math/is-power-of-two) - controlla se il numero è una potenza di due
6666
* `P` [Triangolo di Pascal](src/algorithms/math/pascal-triangle)
67-
* `P` [Numeri Complessi](src/algorithms/math/complex-number) - numeri complessi e operazioni
67+
* `P` [Numeri Complessi](src/algorithms/math/complex-number) - numeri complessi e operazioni
6868
* `P` [Radiante & Gradi](src/algorithms/math/radian) - conversione da radiante a gradi e viceversa
6969
* `P` [Potenza di un Numero](src/algorithms/math/fast-powering)
7070
* `A` [Partizione di un Intero](src/algorithms/math/integer-partition)
7171
* `A` [Radice Quadrata](src/algorithms/math/square-root) - Metodo di Newton
7272
* `A` [Algoritmo di Liu Hui π](src/algorithms/math/liu-hui) - calcolare π usando un poligono
73-
* `A` [Trasformata Discreta di Fourier ](src/algorithms/math/fourier-transform) -decomporre una funzione di tempo (un segnale) nelle frequenze che lo compongono
73+
* `A` [Trasformata Discreta di Fourier ](src/algorithms/math/fourier-transform) -decomporre una funzione di tempo (un segnale) nelle frequenze che lo compongono
7474
* **Set**
7575
* `P` [Prodotto Cartesiano](src/algorithms/sets/cartesian-product) - moltiplicazione multipla di set
7676
* `P` [Fisher–Yates Shuffle](src/algorithms/sets/fisher-yates) - permutazione casuale di un sequenza finita
@@ -116,8 +116,8 @@ un insieme di regole che definiscono con precisione una sequenza di operazioni.
116116
* `P` [Ricerca in Profondità su Grafi](src/algorithms/graph/depth-first-search) (DFS)
117117
* `P` [Breadth-First Search su Grafi](src/algorithms/graph/breadth-first-search) (BFS)
118118
* `P` [Algoritmo di Kruskal](src/algorithms/graph/kruskal) - ricerca dell'Albero con Minima Distanza (MST) per grafi pesati unidirezionali
119-
* `A` [Algoritmo di Dijkstra](src/algorithms/graph/dijkstra) - ricerca dei percorsi più breve per raggiungere tutti i vertici del grafo da un singolo vertice
120-
* `A` [Algoritmo di Bellman-Ford](src/algorithms/graph/bellman-ford) - ricerca dei percorsi più breve per raggiungere tutti i vertici del grafo da un singolo vertice
119+
* `A` [Algoritmo di Dijkstra](src/algorithms/graph/dijkstra) - ricerca dei percorsi più breve per raggiungere tutti i vertici del grafo da un singolo vertice
120+
* `A` [Algoritmo di Bellman-Ford](src/algorithms/graph/bellman-ford) - ricerca dei percorsi più breve per raggiungere tutti i vertici del grafo da un singolo vertice
121121
* `A` [Algoritmo di Floyd-Warshall](src/algorithms/graph/floyd-warshall) - ricerca dei percorsi più brevi tra tutte le coppie di vertici
122122
* `A` [Rivelamento dei Cicli](src/algorithms/graph/detect-cycle) - per grafici diretti e non diretti (basate su partizioni DFS e Disjoint Set)
123123
* `A` [Algoritmo di Prim](src/algorithms/graph/prim) - ricerca dell'Albero Ricoprente Minimo (MST) per grafi unidirezionali pesati
@@ -129,12 +129,12 @@ un insieme di regole che definiscono con precisione una sequenza di operazioni.
129129
* `A` [Componenti Fortemente Connessa](src/algorithms/graph/strongly-connected-components) - algoritmo di Kosaraju
130130
* `A` [Problema del Commesso Viaggiatore](src/algorithms/graph/travelling-salesman) - il percorso più breve che visita ogni città e ritorna alla città iniziale
131131
* **Crittografia**
132-
* `P` [Hash Polinomiale](src/algorithms/cryptography/polynomial-hash) - Una funzione hash di rolling basata sul polinomio
132+
* `P` [Hash Polinomiale](src/algorithms/cryptography/polynomial-hash) - Una funzione hash di rolling basata sul polinomio
133133
* **Senza categoria**
134134
* `P` [Torre di Hanoi](src/algorithms/uncategorized/hanoi-tower)
135135
* `P` [Rotazione Matrice Quadrata](src/algorithms/uncategorized/square-matrix-rotation) - algoritmo in memoria
136136
* `P` [Jump Game](src/algorithms/uncategorized/jump-game) - backtracking, programmazione dinamica (top-down + bottom-up) ed esempre di greeedy
137-
* `P` [Percorsi Unici](src/algorithms/uncategorized/unique-paths) - backtracking, programmazione dinamica and l'esempio del Triangolo di Pascal
137+
* `P` [Percorsi Unici](src/algorithms/uncategorized/unique-paths) - backtracking, programmazione dinamica and l'esempio del Triangolo di Pascal
138138
* `P` [Rain Terraces](src/algorithms/uncategorized/rain-terraces) - problema dell'acqua piovana in trappola(versione con programmazione dinamica e brute force)
139139
* `P` [Recursive Staircase](src/algorithms/uncategorized/recursive-staircase) - contare il numero di percorsi per arrivare in vetta(4 soluzioni)
140140
* `A` [Rompicapo delle Otto Regine](src/algorithms/uncategorized/n-queens)
@@ -151,14 +151,14 @@ un insieme di regole che definiscono con precisione una sequenza di operazioni.
151151
* `P` [Recursive Staircase](src/algorithms/uncategorized/recursive-staircase) - contare il numero di percorsi per arrivare in vetta
152152
* `A` [Massimo SubArray](src/algorithms/sets/maximum-subarray)
153153
* `A` [Problema del commesso viaggiatore](src/algorithms/graph/travelling-salesman) - il percorso più breve che visita ogni città e ritorna alla città iniziale
154-
* `A` [Trasformata Discreta di Fourier](src/algorithms/math/fourier-transform) - scomporre la funzione (segnale) del tempo in frequenze che la compongono
154+
* `A` [Trasformata Discreta di Fourier](src/algorithms/math/fourier-transform) - scomporre la funzione (segnale) del tempo in frequenze che la compongono
155155
* **Greedy** - scegliere l'opzione migliore al momento d'eleborazione dell'algoritmo, senza alcuna considerazione per il futuro
156156
* `P` [Jump Game](src/algorithms/uncategorized/jump-game)
157157
* `A` [Problema dello Zaino di Knapsack](src/algorithms/sets/knapsack-problem)
158158
* `A` [Algoritmo di Dijkstra](src/algorithms/graph/dijkstra) - ricerca del percorso più breve tra tutti i vertici del grafo
159-
* `A` [Algoritmo di Prim](src/algorithms/graph/prim) - ricerca del Minimo Albero Ricoprente per grafi pesati e unidirezionali
159+
* `A` [Algoritmo di Prim](src/algorithms/graph/prim) - ricerca del Minimo Albero Ricoprente per grafi pesati e unidirezionali
160160
* `A` [Kruskal’s Algorithm](src/algorithms/graph/kruskal) - finding Minimum Spanning Tree (MST) for weighted undirected graph
161-
* **Divide e Conquista** - divide il problema in piccole parti e risolve ogni parte
161+
* **Divide e Conquista** - divide il problema in piccole parti e risolve ogni parte
162162
* `P` [Ricerca Binaria](src/algorithms/search/binary-search)
163163
* `P` [Torre di Hanoi](src/algorithms/uncategorized/hanoi-tower)
164164
* `P` [Triangolo di Pascal](src/algorithms/math/pascal-triangle)
@@ -186,7 +186,7 @@ un insieme di regole che definiscono con precisione una sequenza di operazioni.
186186
* `A` [Partizione di un Intero](src/algorithms/math/integer-partition)
187187
* `A` [Massimo SubArray](src/algorithms/sets/maximum-subarray)
188188
* `A` [Algoritmo di Bellman-Ford](src/algorithms/graph/bellman-ford) - ricerca del percorso più breve per tutti i vertici del grafo
189-
* `A` [Algoritmo di Floyd-Warshall](src/algorithms/graph/floyd-warshall) - ricerca del percorso più breve tra tutte le coppie di vertici
189+
* `A` [Algoritmo di Floyd-Warshall](src/algorithms/graph/floyd-warshall) - ricerca del percorso più breve tra tutte le coppie di vertici
190190
* `A` [Espressioni Regolari](src/algorithms/string/regular-expression-matching)
191191
* **Backtracking** - come la brute force, provate a generare tutte le soluzioni possibili, ma ogni volta che generate la prossima soluzione testate se soddisfa tutte le condizioni e solo allora continuare a generare soluzioni successive. Altrimenti, fate marcia indietro, e andate su un percorso diverso per trovare una soluzione. Normalmente si utilizza l'algoritmo DFS.
192192
* `P` [Jump Game](src/algorithms/uncategorized/jump-game)
@@ -228,10 +228,10 @@ npm test -- 'LinkedList'
228228

229229
**Playground**
230230

231-
Se vuoi puoi giocare le strutture dati e gli algoritmi nel file ./src/playground/playground.js` e
231+
Se vuoi puoi giocare le strutture dati e gli algoritmi nel file ./src/playground/playground.js` e
232232
scrivere test nel file `./src/playground/__test__/playground.test.js`.
233233

234-
Poi puoi semplicemente eseguire il seguente comando per testare quello che hai scritto :
234+
Poi puoi semplicemente eseguire il seguente comando per testare quello che hai scritto :
235235

236236
```
237237
npm test -- 'playground'
@@ -243,9 +243,9 @@ npm test -- 'playground'
243243

244244
[▶ Data Structures and Algorithms on YouTube](https://www.youtube.com/playlist?list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8)
245245

246-
### Notazione Big O
246+
### Notazione Big O
247247

248-
* La notazione Big O* è usata per classificare algoritmi in base al tempo di esecuzione o ai
248+
* La notazione Big O* è usata per classificare algoritmi in base al tempo di esecuzione o ai
249249
requisiti di spazio che crescono in base alla crescita dell'input .
250250
Nella grafico qua sotto puoi trovare gli ordini di crescita più comuni degli algoritmi usando la notazione Big O.
251251

‎README.ja-JP.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ _Read this in other languages:_
6060

6161
* **数学**
6262
* `B` [ビット操作](src/algorithms/math/bits) - set/get/update/clear bits, 2つの乗算/除算, 否定的にする. 等
63-
* `B` [因果関係](src/algorithms/math/factorial)
63+
* `B` [因果関係](src/algorithms/math/factorial)
6464
* `B` [フィボナッチ数](src/algorithms/math/fibonacci) - クラシックとクローズドフォームのバージョン
6565
* `B` [素数性テスト](src/algorithms/math/primality-test) (trial division 方法)
6666
* `B` [ユークリッドアルゴリズム](src/algorithms/math/euclidean-algorithm) - 最大公約数を計算する (GCD)
@@ -118,7 +118,7 @@ _Read this in other languages:_
118118
* **グラフ**
119119
* `B` [深度優先検索](src/algorithms/graph/depth-first-search) (DFS)
120120
* `B` [幅優先検索](src/algorithms/graph/breadth-first-search) (BFS)
121-
* `B` [Kruskalのアルゴリズム](src/algorithms/graph/kruskal) - 重み付き無向グラフの最小スパニングツリー(MST)の発見
121+
* `B` [Kruskalのアルゴリズム](src/algorithms/graph/kruskal) - 重み付き無向グラフの最小スパニングツリー(MST)の発見
122122
* `A` [Dijkstraアルゴリズム](src/algorithms/graph/dijkstra) - 単一の頂点からすべてのグラフ頂点への最短経路を見つける
123123
* `A` [Bellman-Fordアルゴリズム](src/algorithms/graph/bellman-ford) - 単一の頂点からすべてのグラフ頂点への最短経路を見つける
124124
* `A` [Floyd-Warshallアルゴリズム](src/algorithms/graph/floyd-warshall) - すべての頂点ペア間の最短経路を見つける

‎README.ko-KR.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ _Read this in other languages:_
2525

2626
자료 구조는 데이터를 특정 방식으로 구성하고 저장함으로써 더 효율적으로
2727
접근하고 수정할 수 있게 해줍니다. 간단히 말해, 자료 구조는 데이터 값들,
28-
데이터 간의 관계, 그리고 데이터를 다룰 수 있는 함수와 작업의 모임입니다.
28+
데이터 간의 관계, 그리고 데이터를 다룰 수 있는 함수와 작업의 모임입니다.
2929

3030

3131
`B` - 입문자, `A` - 숙련자
@@ -50,16 +50,16 @@ _Read this in other languages:_
5050

5151
## 알고리즘
5252

53-
알고리즘은 어떤 종류의 문제를 풀 수 있는 정확한 방법이며,
54-
일련의 작업을 정확하게 정의해 놓은 규칙들입니다.
53+
알고리즘은 어떤 종류의 문제를 풀 수 있는 정확한 방법이며,
54+
일련의 작업을 정확하게 정의해 놓은 규칙들입니다.
5555

5656
`B` - 입문자, `A` - 숙련자
5757

5858
### 주제별 알고리즘
5959

6060
* **Math**
6161
* `B` [Bit Manipulation](src/algorithms/math/bits) - set/get/update/clear bits, 2의 곱 / 나누기, 음수로 만들기 etc.
62-
* `B` [팩토리얼](src/algorithms/math/factorial)
62+
* `B` [팩토리얼](src/algorithms/math/factorial)
6363
* `B` [피보나치 수](src/algorithms/math/fibonacci)
6464
* `B` [소수 판별](src/algorithms/math/primality-test) (trial division 방식)
6565
* `B` [유클리드 호제법](src/algorithms/math/euclidean-algorithm) - 최대공약수 (GCD)
@@ -126,7 +126,7 @@ _Read this in other languages:_
126126
* **Uncategorized**
127127
* `B` [하노이 탑](src/algorithms/uncategorized/hanoi-tower)
128128
* `B` [정방 행렬 회전](src/algorithms/uncategorized/square-matrix-rotation) - 제자리(in-place) 알고리즘
129-
* `B` [점프 게임](src/algorithms/uncategorized/jump-game) - 백트래킹, 동적계획법 (top-down + bottom-up), 탐욕 알고리즘 예제
129+
* `B` [점프 게임](src/algorithms/uncategorized/jump-game) - 백트래킹, 동적계획법 (top-down + bottom-up), 탐욕 알고리즘 예제
130130
* `B` [Unique 경로](src/algorithms/uncategorized/unique-paths) - 백트래킹, 동적계획법, 파스칼 삼각형에 기반한 예제
131131
* `B` [빗물 담기 문제](src/algorithms/uncategorized/rain-terraces) - trapping rain water problem (동적계획법, 브루트포스 버전)
132132
* `A` [N-Queens 문제](src/algorithms/uncategorized/n-queens)

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ a set of rules that precisely define a sequence of operations.
6666
* `B` [Bit Manipulation](src/algorithms/math/bits) - set/get/update/clear bits, multiplication/division by two, make negative etc.
6767
* `B` [Factorial](src/algorithms/math/factorial)
6868
* `B` [Fibonacci Number](src/algorithms/math/fibonacci) - classic and closed-form versions
69-
* `B` [Prime Factors](src/algorithms/math/prime-factors) - finding prime factors and counting them using Hardy-Ramanujan's theorem
69+
* `B` [Prime Factors](src/algorithms/math/prime-factors) - finding prime factors and counting them using Hardy-Ramanujan's theorem
7070
* `B` [Primality Test](src/algorithms/math/primality-test) (trial division method)
7171
* `B` [Euclidean Algorithm](src/algorithms/math/euclidean-algorithm) - calculate the Greatest Common Divisor (GCD)
7272
* `B` [Least Common Multiple](src/algorithms/math/least-common-multiple) (LCM)
@@ -142,7 +142,7 @@ a set of rules that precisely define a sequence of operations.
142142
* `B` [Polynomial Hash](src/algorithms/cryptography/polynomial-hash) - rolling hash function based on polynomial
143143
* `B` [Caesar Cipher](src/algorithms/cryptography/caesar-cipher) - simple substitution cipher
144144
* **Machine Learning**
145-
* `B` [NanoNeuron](https://github.com/trekhleb/nano-neuron) - 7 simple JS functions that illustrate how machines can actually learn (forward/backward propagation)
145+
* `B` [NanoNeuron](https://github.com/trekhleb/nano-neuron) - 7 simple JS functions that illustrate how machines can actually learn (forward/backward propagation)
146146
* `B` [KNN](src/algorithms/ML/KNN) - K Nearest Neighbors
147147
* **Uncategorized**
148148
* `B` [Tower of Hanoi](src/algorithms/uncategorized/hanoi-tower)

‎README.pl-PL.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
[![CI](https://github.com/trekhleb/javascript-algorithms/workflows/CI/badge.svg)](https://github.com/trekhleb/javascript-algorithms/actions)
44
[![codecov](https://codecov.io/gh/trekhleb/javascript-algorithms/branch/master/graph/badge.svg)](https://codecov.io/gh/trekhleb/javascript-algorithms)
55

6-
To repozytorium zawiera wiele przykładów JavaScript opartych na
6+
To repozytorium zawiera wiele przykładów JavaScript opartych na
77
znanych algorytmach i strukturach danych.
88

99
Każdy algorytm i struktura danych zawiera osobny plik README
10-
wraz z powiązanymi wyjaśnieniami i odnośnikami do dalszego czytania
10+
wraz z powiązanymi wyjaśnieniami i odnośnikami do dalszego czytania
1111
(włącznie z tymi do YouTube videos).
1212

1313
_Read this in other languages:_
@@ -25,10 +25,10 @@ _Read this in other languages:_
2525

2626
## Struktury Danych
2727

28-
Struktura danych to sposób uporządkowania i przechowywania informacji w
28+
Struktura danych to sposób uporządkowania i przechowywania informacji w
2929
komputerze żeby mogłaby być sprawnie dostępna i efektywnie zmodyfikowana.
30-
Dokładniej, struktura danych jest zbiorem wartości danych, relacjami
31-
pomiędzy nimi, zadaniami lub działaniami, które mogą dotyczyć danych.
30+
Dokładniej, struktura danych jest zbiorem wartości danych, relacjami
31+
pomiędzy nimi, zadaniami lub działaniami, które mogą dotyczyć danych.
3232

3333
`B` - Początkujący, `A` - Zaawansowany
3434

@@ -52,8 +52,8 @@ pomiędzy nimi, zadaniami lub działaniami, które mogą dotyczyć danych.
5252

5353
## Algorytmy
5454

55-
Algorytm jest to skończony ciąg jasno zdefiniowanych czynności, koniecznych
56-
do wykonania pewnego rodzaju zadań. Sposób postępowania prowadzący do
55+
Algorytm jest to skończony ciąg jasno zdefiniowanych czynności, koniecznych
56+
do wykonania pewnego rodzaju zadań. Sposób postępowania prowadzący do
5757
rozwiązania problemu.
5858

5959
`B` - Początkujący, `A` - Zaawansowany
@@ -62,7 +62,7 @@ rozwiązania problemu.
6262

6363
* **Matematyka**
6464
* `B` [Manipulacja Bitami](src/algorithms/math/bits) - ustaw / uzyskaj / aktualizuj / usuwaj bity, mnożenie / dzielenie przez dwa, tworzenie negatywów itp.
65-
* `B` [Silna](src/algorithms/math/factorial)
65+
* `B` [Silna](src/algorithms/math/factorial)
6666
* `B` [Ciąg Fibonacciego](src/algorithms/math/fibonacci)
6767
* `B` [Test Pierwszorzędności](src/algorithms/math/primality-test) (metoda podziału na próby)
6868
* `B` [Algorytm Euclideana](src/algorithms/math/euclidean-algorithm) - obliczyć Największy Wspólny Dzielnik (GCD)
@@ -81,9 +81,9 @@ rozwiązania problemu.
8181
* `A` [Najdłuższa Wspólna Podsekwencja](src/algorithms/sets/longest-common-subsequence) (LCS)
8282
* `A` [Najdłuższa Wzrostająca Podsekwencja](src/algorithms/sets/longest-increasing-subsequence)
8383
* `A` [Najkrótsza Wspólna Supersekwencja](src/algorithms/sets/shortest-common-supersequence) (SCS)
84-
* `A` [Problem Knapsacka](src/algorithms/sets/knapsack-problem) - "0/1" i "Rozwiązany"
84+
* `A` [Problem Knapsacka](src/algorithms/sets/knapsack-problem) - "0/1" i "Rozwiązany"
8585
* `A` [Maksymalna Podtablica](src/algorithms/sets/maximum-subarray) - "Metoda Siłowa" i "Dynamiczne Programowanie" (Kadane-a) wersje
86-
* `A` [Suma Kombinacji](src/algorithms/sets/combination-sum) -
86+
* `A` [Suma Kombinacji](src/algorithms/sets/combination-sum) -
8787
znajdź wszystkie kombinacje, które tworzą określoną sumę
8888
* **Łańcuchy**
8989
* `B` [Odległość Hamminga](src/algorithms/string/hamming-distance) - liczba pozycji, w których symbole są różne
@@ -120,26 +120,26 @@ znajdź wszystkie kombinacje, które tworzą określoną sumę
120120
* `A` [Algorytm Floyd-Warshalla](src/algorithms/graph/floyd-warshall) - znajdź najkrótsze ścieżki między wszystkimi parami wierzchołków
121121
* `A` [Detect Cycle](src/algorithms/graph/detect-cycle) - zarówno dla wykresów skierowanych, jak i nieukierunkowanych(wersje oparte na DFS i Rozłączny Zestaw)
122122
* `A` [Algorytm Prima](src/algorithms/graph/prim) - znalezienie Minimalnego Drzewa Opinającego (MST) dla ważonego nieukierunkowanego wykresu
123-
* `A` [Sortowanie Topologiczne](src/algorithms/graph/topological-sorting) - metoda DFS
123+
* `A` [Sortowanie Topologiczne](src/algorithms/graph/topological-sorting) - metoda DFS
124124
* `A` [Punkty Artykulacji](src/algorithms/graph/articulation-points) - Algorytm Tarjana (oparty o DFS)
125-
* `A` [Mosty](src/algorithms/graph/bridges) - Oparty na algorytmie DFS
125+
* `A` [Mosty](src/algorithms/graph/bridges) - Oparty na algorytmie DFS
126126
* `A` [Ścieżka Euleriana i Obwód Euleriana](src/algorithms/graph/eulerian-path) - Algorytm Fleurya - Odwiedź każdą krawędź dokładnie raz
127127
* `A` [Cykl Hamiltoniana](src/algorithms/graph/hamiltonian-cycle) - Odwiedź każdy wierzchołek dokładnie raz
128-
* `A` [Silnie Połączone Komponenty](src/algorithms/graph/strongly-connected-components) - Algorytm Kosaraja
128+
* `A` [Silnie Połączone Komponenty](src/algorithms/graph/strongly-connected-components) - Algorytm Kosaraja
129129
* `A` [Travelling Salesman Problem](src/algorithms/graph/travelling-salesman) - najkrótsza ścieżka która odwiedza każde miasto i wraca miasta początkującego
130130
* **Niezkategorizowane**
131131
* `B` [Wieża Hanoi](src/algorithms/uncategorized/hanoi-tower)
132132
* `B` [Kwadratowa Matryca Obrotu](src/algorithms/uncategorized/square-matrix-rotation) - algorytm w miejscu
133-
* `B` [Jump Game](src/algorithms/uncategorized/jump-game) - cofanie, dynamiczne programowanie (od góry do dołu + od dołu do góry) i przykłady chciwego
133+
* `B` [Jump Game](src/algorithms/uncategorized/jump-game) - cofanie, dynamiczne programowanie (od góry do dołu + od dołu do góry) i przykłady chciwego
134134
* `B` [Unikatowe Ścieżki](src/algorithms/uncategorized/unique-paths) - cofanie, dynamiczne programowanie i przykłady oparte na Trójkącie Pascala
135135
* `A` [Problem N-Queens](src/algorithms/uncategorized/n-queens)
136136
* `A` [Knight's Tour](src/algorithms/uncategorized/knight-tour)
137137

138138
### Algorytmy według paradygmatu
139139

140-
Paradygmat algorytmiczny jest ogólną metodą lub podejściem, które jest
141-
podstawą projektowania klasy algorytmów. Jest abstrakcją wyższą niż
142-
pojęcie algorytmu, podobnie jak algorytm jest abstrakcją wyższą niż
140+
Paradygmat algorytmiczny jest ogólną metodą lub podejściem, które jest
141+
podstawą projektowania klasy algorytmów. Jest abstrakcją wyższą niż
142+
pojęcie algorytmu, podobnie jak algorytm jest abstrakcją wyższą niż
143143
program komputerowy.
144144

145145
* **Metoda Siłowa** - Sprawdza wszystkie możliwosci i wybiera najlepsze rozwiązanie.
@@ -149,7 +149,7 @@ program komputerowy.
149149
* **Chciwy** - wybierz najlepszą opcję w obecnym czasie, bez względu na przyszłość
150150
* `B` [Jump Game](src/algorithms/uncategorized/jump-game)
151151
* `A` [Niezwiązany Problem Knapsacka ](src/algorithms/sets/knapsack-problem)
152-
* `A` [Algorytm Dijkstry](src/algorithms/graph/dijkstra) -
152+
* `A` [Algorytm Dijkstry](src/algorithms/graph/dijkstra) -
153153
znalezienie najkrótszej ścieżki do wszystkich wierzchołków grafu
154154
* `A` [Algorytm Prima](src/algorithms/graph/prim) - znalezienie Minimalnego Drzewa Opinającego (MST) dla ważonego nieukierunkowanego wykresu
155155
* `A` [Algorytm Kruskala](src/algorithms/graph/kruskal) - znalezienie Minimalnego Drzewa Opinającego (MST) dla ważonego nieukierunkowanego wykresu
@@ -178,7 +178,7 @@ znalezienie najkrótszej ścieżki do wszystkich wierzchołków grafu
178178
* `A` [Partycja Całkowita](src/algorithms/math/integer-partition)
179179
* `A` [Maksymalne Podtablice](src/algorithms/sets/maximum-subarray)
180180
* `A` [Algorytm Bellman-Forda](src/algorithms/graph/bellman-ford) - znalezienie najkrótszej ścieżki wszystkich wierzchołków wykresu
181-
* `A` [Algorytm Floyd-Warshalla](src/algorithms/graph/floyd-warshall) -
181+
* `A` [Algorytm Floyd-Warshalla](src/algorithms/graph/floyd-warshall) -
182182
znajdź najkrótsze ścieżki między wszystkimi parami wierzchołków
183183
* `A` [Dopasowanie Wyrażeń Regularnych](src/algorithms/string/regular-expression-matching)
184184
* **Algorytm z nawrotami** - podobny do metody siłowej, próbuje wygenerować wszystkie możliwe rozwiązania, jednak za każdym razem generujesz następne rozwiązanie które testujesz
@@ -192,7 +192,7 @@ jeżeli zaspokaja wszystkie warunki, tylko wtedy generuje kolejne rozwiązania.
192192
* **Metoda Podziału i Ograniczeń** - Pamięta o niskonakładowym rozwiązaniu znalezionym na każdym etapie szukania nawrotu,
193193
używa kosztu niskonakładowego kosztu, które dotychczas zostało znalezione jako niska granica najmniejszego kosztu
194194
do rozwiązanie problemu, aby odrzucić cząstkowe rozwiązania o kosztach większych niż niskonakładowe
195-
rozwiązanie znalezione do tej pory.
195+
rozwiązanie znalezione do tej pory.
196196
Zazwyczan trajektoria BFS, w połączeniu z trajektorią Przeszukiwania W Głąb (DFS) drzewa przestrzeni stanów jest użyte.
197197

198198
## Jak używać repozytorium
@@ -225,7 +225,7 @@ npm test -- 'LinkedList'
225225
Możesz pociwiczyć ze strukturą danych i algorytmami w `./src/playground/playground.js` zakartotekuj i napisz
226226
testy do tego w `./src/playground/__test__/playground.test.js`.
227227

228-
Następnie uruchom następującą komendę w celu przetestowania czy twoje kod działa według oczekiwań:
228+
Następnie uruchom następującą komendę w celu przetestowania czy twoje kod działa według oczekiwań:
229229

230230
```
231231
npm test -- 'playground'
@@ -239,7 +239,7 @@ npm test -- 'playground'
239239

240240
### Big O Notacja
241241

242-
Kolejność wzrastania algorytmów według Big O notacji.
242+
Kolejność wzrastania algorytmów według Big O notacji.
243243

244244
![Big O grafy](./assets/big-o-graph.png)
245245

‎README.pt-BR.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![codecov](https://codecov.io/gh/trekhleb/javascript-algorithms/branch/master/graph/badge.svg)](https://codecov.io/gh/trekhleb/javascript-algorithms)
55

66
Este repositório contém exemplos baseados em JavaScript de muitos
7-
algoritmos e estruturas de dados populares.
7+
algoritmos e estruturas de dados populares.
88

99
Cada algoritmo e estrutura de dado possui seu próprio README
1010
com explicações relacionadas e links para leitura adicional (incluindo
@@ -61,7 +61,7 @@ um conjunto de regras que define precisamente uma sequência de operações.
6161

6262
* **Matemática**
6363
* `B` [Manipulação Bit](src/algorithms/math/bits) - set/get/update/clear bits, multiplicação / divisão por dois, tornar negativo etc.
64-
* `B` [Fatorial](src/algorithms/math/factorial)
64+
* `B` [Fatorial](src/algorithms/math/factorial)
6565
* `B` [Número de Fibonacci](src/algorithms/math/fibonacci)
6666
* `B` [Teste de Primalidade](src/algorithms/math/primality-test) (método de divisão experimental)
6767
* `B` [Algoritmo Euclidiano](src/algorithms/math/euclidean-algorithm) - calcular o maior divisor comum (GCD)
@@ -119,7 +119,7 @@ um conjunto de regras que define precisamente uma sequência de operações.
119119
* `A` [Floyd-Warshall Algorithm](src/algorithms/graph/floyd-warshall) - encontrar caminhos mais curtos entre todos os pares de vértices
120120
* `A` [Detect Cycle](src/algorithms/graph/detect-cycle) - para gráficos direcionados e não direcionados (versões baseadas em DFS e Conjunto Disjuntivo)
121121
* `A` [Prim’s Algorithm](src/algorithms/graph/prim) - encontrando Árvore Mínima de Abrangência (MST) para grafo não direcionado ponderado
122-
* `A` [Topological Sorting](src/algorithms/graph/topological-sorting) - Métodos DFS
122+
* `A` [Topological Sorting](src/algorithms/graph/topological-sorting) - Métodos DFS
123123
* `A` [Articulation Points](src/algorithms/graph/articulation-points) -O algoritmo de Tarjan (baseado em DFS)
124124
* `A` [Bridges](src/algorithms/graph/bridges) - Algoritmo baseado em DFS
125125
* `A` [Eulerian Path and Eulerian Circuit](src/algorithms/graph/eulerian-path) - Algoritmo de Fleury - Visite todas as bordas exatamente uma vez

‎README.ru-RU.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ _Читать на других языках:_
5656

5757
* **Математика**
5858
* `B` [Битовые манипуляции](src/algorithms/math/bits) — получение/запись/сброс/обновление битов, умножение/деление на 2, сделать отрицательным и т.п.
59-
* `B` [Факториал](src/algorithms/math/factorial)
59+
* `B` [Факториал](src/algorithms/math/factorial)
6060
* `B` [Числа Фибоначчи](src/algorithms/math/fibonacci) — классическое решение, решение в замкнутой форме
6161
* `B` [Тест простоты](src/algorithms/math/primality-test) (метод пробного деления)
6262
* `B` [Алгоритм Евклида](src/algorithms/math/euclidean-algorithm) — нахождение наибольшего общего делителя (НОД)
@@ -70,7 +70,7 @@ _Читать на других языках:_
7070
* `A` [Разбиение числа](src/algorithms/math/integer-partition)
7171
* `A` [Квадратный корень](src/algorithms/math/square-root) — метод Ньютона
7272
* `A` [Алгоритм Лю Хуэя](src/algorithms/math/liu-hui) — расчёт числа π с заданной точностью методом вписанных правильных многоугольников
73-
* `A` [Дискретное преобразование Фурье](src/algorithms/math/fourier-transform) — разложение временной функции (сигнала) на частотные составляющие
73+
* `A` [Дискретное преобразование Фурье](src/algorithms/math/fourier-transform) — разложение временной функции (сигнала) на частотные составляющие
7474
* **Множества**
7575
* `B` [Декартово произведение](src/algorithms/sets/cartesian-product) — результат перемножения множеств
7676
* `B` [Тасование Фишера — Йетса](src/algorithms/sets/fisher-yates) — создание случайных перестановок конечного множества
@@ -135,7 +135,7 @@ _Читать на других языках:_
135135
* **Прочие алгоритмы**
136136
* `B` [Ханойская башня](src/algorithms/uncategorized/hanoi-tower)
137137
* `B` [Поворот квадратной матрицы](src/algorithms/uncategorized/square-matrix-rotation) — используется дополнительная память
138-
* `B` [Прыжки](src/algorithms/uncategorized/jump-game) — на основе бэктрекинга, динамического программирования (сверху-вниз + снизу-вверх) и жадных алгоритмов
138+
* `B` [Прыжки](src/algorithms/uncategorized/jump-game) — на основе бэктрекинга, динамического программирования (сверху-вниз + снизу-вверх) и жадных алгоритмов
139139
* `B` [Поиск уникальных путей](src/algorithms/uncategorized/unique-paths) — на основе бэктрекинга, динамического программирования и треугольника Паскаля
140140
* `B` [Подсчёт дождевой воды](src/algorithms/uncategorized/rain-terraces) — на основе перебора и динамического программирования
141141
* `B` [Задача о рекурсивной лестнице](src/algorithms/uncategorized/recursive-staircase) — подсчёт количества путей, по которым можно достичь верха лестницы (4 способа)
@@ -153,7 +153,7 @@ _Читать на других языках:_
153153
* `A` [Максимальный подмассив](src/algorithms/sets/maximum-subarray)
154154
* `A` [Задача коммивояжёра](src/algorithms/graph/travelling-salesman) — кратчайший маршрут, проходящий через указанные города с последующим возвратом в исходный город
155155
* `A` [Дискретное преобразование Фурье](src/algorithms/math/fourier-transform) — разложение временной функции (сигнала) на частотные составляющие
156-
* **Жадные алгоритмы** — принятие локально оптимальных решений с учётом допущения об оптимальности конечного решения
156+
* **Жадные алгоритмы** — принятие локально оптимальных решений с учётом допущения об оптимальности конечного решения
157157
* `B` [Прыжки](src/algorithms/uncategorized/jump-game)
158158
* `A` [Задача о неограниченном рюкзаке](src/algorithms/sets/knapsack-problem)
159159
* `A` [Алгоритм Дейкстры](src/algorithms/graph/dijkstra) — нахождение кратчайших путей от одной из вершин графа до всех остальных
@@ -228,7 +228,7 @@ npm test -- 'LinkedList'
228228

229229
**Песочница**
230230

231-
Вы можете экспериментировать с алгоритмами и структурами данных в файле `./src/playground/playground.js`
231+
Вы можете экспериментировать с алгоритмами и структурами данных в файле `./src/playground/playground.js`
232232
(файл `./src/playground/__test__/playground.test.js` предназначен для написания тестов).
233233

234234
Для проверки работоспособности вашего кода используйте команду:

‎README.tr-TR.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
Bu repository JavaScript'e ait popüler
77
algoritma ve veri yapılarını içermektedir.
88

9-
Her bir algoritma ve veri yapısı kendine
10-
ait açıklama ve videoya sahip README dosyası içerir.
9+
Her bir algoritma ve veri yapısı kendine
10+
ait açıklama ve videoya sahip README dosyası içerir.
1111

1212
_Read this in other languages:_
1313
[_简体中文_](README.zh-CN.md),
@@ -21,7 +21,7 @@ _Read this in other languages:_
2121
[_Русский_](README.ru-RU.md),
2222
[_Italiana_](README.it-IT.md)
2323

24-
*☝ Not, bu proje araştırma ve öğrenme amacı ile yapılmış
24+
*☝ Not, bu proje araştırma ve öğrenme amacı ile yapılmış
2525
olup üretim için **yaplılmamıştır**.*
2626

2727
## Veri Yapıları
@@ -63,7 +63,7 @@ bir işlem dizisini kesin olarak tanımlayan bir dizi kural.
6363

6464
* **Matematik**
6565
* `B` [Bit Manipülasyonu](src/algorithms/math/bits) - set/get/update/clear bits, multiplication/division by two, make negative etc.
66-
* `B` [Faktöriyel](src/algorithms/math/factorial)
66+
* `B` [Faktöriyel](src/algorithms/math/factorial)
6767
* `B` [Fibonacci Sayısı](src/algorithms/math/fibonacci) - klasik ve kapalı-form versiyonları
6868
* `B` [Asallık Testi](src/algorithms/math/primality-test) (trial division method)
6969
* `B` [Öklid Algoritması](src/algorithms/math/euclidean-algorithm) - En büyük ortak bölen hesaplama (EBOB)
@@ -143,17 +143,17 @@ bir işlem dizisini kesin olarak tanımlayan bir dizi kural.
143143
* **Kategoriye Ayrılmayanlar**
144144
* `B` [Tower of Hanoi](src/algorithms/uncategorized/hanoi-tower)
145145
* `B` [Square Matrix Rotation](src/algorithms/uncategorized/square-matrix-rotation) - in-place algorithm
146-
* `B` [Jump Game](src/algorithms/uncategorized/jump-game) - backtracking, dynamic programming (top-down + bottom-up) and greedy examples
147-
* `B` [Unique Paths](src/algorithms/uncategorized/unique-paths) - backtracking, dynamic programming and Pascal's Triangle based examples
146+
* `B` [Jump Game](src/algorithms/uncategorized/jump-game) - backtracking, dynamic programming (top-down + bottom-up) and greedy examples
147+
* `B` [Unique Paths](src/algorithms/uncategorized/unique-paths) - backtracking, dynamic programming and Pascal's Triangle based examples
148148
* `B` [Rain Terraces](src/algorithms/uncategorized/rain-terraces) - trapping rain water problem (dynamic programming and brute force versions)
149149
* `B` [Recursive Staircase](src/algorithms/uncategorized/recursive-staircase) - tepeye ulaşmanın yollarını sayma (4 çözüm)
150150
* `A` [N-Queens Problem](src/algorithms/uncategorized/n-queens)
151151
* `A` [Knight's Tour](src/algorithms/uncategorized/knight-tour)
152152

153153
### Algoritmik Paradigma
154154

155-
Algoritmik paradigma, bir sınıfın tasarımının altında yatan genel bir yöntem veya yaklaşımdır.
156-
Algoritma dizayn tekniği olarak düşünülebilir. Her bir altproblemi (subproblem) asıl problemle
155+
Algoritmik paradigma, bir sınıfın tasarımının altında yatan genel bir yöntem veya yaklaşımdır.
156+
Algoritma dizayn tekniği olarak düşünülebilir. Her bir altproblemi (subproblem) asıl problemle
157157
benzerlik gösteren problemlere uygulanabilir.
158158

159159
* **Brute Force** - mümkün olan tüm çözümleri tara ve en iyisini seç
@@ -198,7 +198,7 @@ benzerlik gösteren problemlere uygulanabilir.
198198
* `A` [Maximum Subarray](src/algorithms/sets/maximum-subarray)
199199
* `A` [Bellman-Ford Algorithm](src/algorithms/graph/bellman-ford) - tüm grafik köşelerine giden en kısa yolu bulmak
200200
* `A` [Floyd-Warshall Algorithm](src/algorithms/graph/floyd-warshall) - tüm köşe çiftleri arasındaki en kısa yolları bulun
201-
* `A` [Regular Expression Matching](src/algorithms/string/regular-expression-matching)
201+
* `A` [Regular Expression Matching](src/algorithms/string/regular-expression-matching)
202202
* **Backtracking** - brute forceye benzer, mümkün tüm sonuçları tara, ancak bir sonraki çözümü her ürettiğinizde test edersiniz
203203
tüm koşulları karşılıyorsa ve ancak o zaman sonraki çözümleri üretmeye devam edin. Aksi takdirde, geri dönün ve farklı bir çözüm arayın(?).
204204
Normally the DFS traversal of state-space is being used.
@@ -242,7 +242,7 @@ npm test -- 'LinkedList'
242242

243243
**Deneme Alanı**
244244

245-
data-structures ve algorithms içerisinde `./src/playground/playground.js`
245+
data-structures ve algorithms içerisinde `./src/playground/playground.js`
246246
yazarak `./src/playground/__test__/playground.test.js` için test edebilirsin.
247247

248248

@@ -310,4 +310,4 @@ Altta Big O notations ve farklı input boyutlarına karşın yapılmış perform
310310

311311
## Projeyi Destekleme
312312

313-
Bu projeyi buradan destekleyebilirsiniz ❤️️ [GitHub](https://github.com/sponsors/trekhleb) veya ❤️️ [Patreon](https://www.patreon.com/trekhleb).
313+
Bu projeyi buradan destekleyebilirsiniz ❤️️ [GitHub](https://github.com/sponsors/trekhleb) veya ❤️️ [Patreon](https://www.patreon.com/trekhleb).

‎src/algorithms/sorting/bubble-sort/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
_Read this in other languages:_
44
[_Português_](README.pt-BR.md)
55

6-
Bubble sort, sometimes referred to as sinking sort, is a
7-
simple sorting algorithm that repeatedly steps through
8-
the list to be sorted, compares each pair of adjacent
9-
items and swaps them if they are in the wrong order
6+
Bubble sort, sometimes referred to as sinking sort, is a
7+
simple sorting algorithm that repeatedly steps through
8+
the list to be sorted, compares each pair of adjacent
9+
items and swaps them if they are in the wrong order
1010
(ascending or descending arrangement). The pass through
11-
the list is repeated until no swaps are needed, which
11+
the list is repeated until no swaps are needed, which
1212
indicates that the list is sorted.
1313

1414
![Algorithm Visualization](https://upload.wikimedia.org/wikipedia/commons/c/c8/Bubble-sort-example-300px.gif)

‎src/algorithms/sorting/bubble-sort/README.pt-BR.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Bubble Sort
22

3-
O bubble sort, ou ordenação por flutuação (literalmente "por bolha"), é um algoritmo de ordenação dos mais simples. A ideia é percorrer o vetor diversas vezes, e a cada passagem fazer flutuar para o topo o maior elemento da sequência. Essa movimentação lembra a forma como as bolhas em um tanque de água procuram seu próprio nível, e disso vem o nome do algoritmo.
3+
O bubble sort, ou ordenação por flutuação (literalmente "por bolha"), é um algoritmo de ordenação dos mais simples. A ideia é percorrer o vetor diversas vezes, e a cada passagem fazer flutuar para o topo o maior elemento da sequência. Essa movimentação lembra a forma como as bolhas em um tanque de água procuram seu próprio nível, e disso vem o nome do algoritmo.
44

55
![Algorithm Visualization](https://upload.wikimedia.org/wikipedia/commons/c/c8/Bubble-sort-example-300px.gif)
66

0 commit comments

Comments
 (0)
Please sign in to comment.