From 354ac26f6332dd22e598f204ad1400931f491a92 Mon Sep 17 00:00:00 2001 From: Nisar Hassan Naqvi Date: Mon, 21 Oct 2019 10:24:06 +0000 Subject: [PATCH] Configures Gitpod. --- .gitpod.yml | 2 ++ README.es-ES.md | 12 ++++++++---- README.fr-FR.md | 44 ++++++++++++++++++++++++-------------------- README.ja-JP.md | 8 ++++++-- README.ko-KR.md | 14 +++++++++----- README.md | 14 +++++++++----- README.pl-PL.md | 48 ++++++++++++++++++++++++++---------------------- README.pt-BR.md | 10 +++++++--- README.zh-CN.md | 4 ++++ README.zh-TW.md | 4 ++++ 10 files changed, 99 insertions(+), 61 deletions(-) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000000..2b06da224e --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,2 @@ +tasks: + - init: npm install diff --git a/README.es-ES.md b/README.es-ES.md index 76c30b19f8..133a74b8c3 100644 --- a/README.es-ES.md +++ b/README.es-ES.md @@ -6,7 +6,7 @@ Este repositorio contiene ejemplos basados en JavaScript de muchos algoritmos y estructuras de datos populares. -Cada algoritmo y estructura de datos tiene su propio LÉAME con explicaciones relacionadas y +Cada algoritmo y estructura de datos tiene su propio LÉAME con explicaciones relacionadas y enlaces para lecturas adicionales (incluyendo algunas a vídeos de YouTube). _Léelo en otros idiomas:_ @@ -51,7 +51,7 @@ los datos. ## Algoritmos -Un algoritmo es una especificación inequívoca de cómo resolver una clase de problemas. Es un conjunto de reglas que +Un algoritmo es una especificación inequívoca de cómo resolver una clase de problemas. Es un conjunto de reglas que definen con precisión una secuencia de operaciones. `P` - Principiante, `A` - Avanzado @@ -200,6 +200,10 @@ Es una abstracción superior a la noción de algoritmo, del mismo modo que un al ## Cómo usar este repositorio +Puede configurar este repositorio localmente siguiendo los pasos a continuación o usar [gitpod.io](https://gitpod.io) un VS-Code en línea gratuito como IDE, con un solo clic abrirá un espacio de trabajo listo para codificar con todas las dependencias preinstaladas para que pueda comenzar a piratear el proyecto sin perder un tiempo precioso en la configuración del desarrollo. + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/trekhleb/javascript-algorithms) + **Instalar las dependencias** ``` @@ -228,7 +232,7 @@ npm test -- 'LinkedList' **Campo de juegos** -Puede jugar con estructuras de datos y algoritmos en el archivo `./src/playground/playground.js` y escribir +Puede jugar con estructuras de datos y algoritmos en el archivo `./src/playground/playground.js` y escribir pruebas para ello en `./src/playground/__test__/playground.test.js`. A continuación, simplemente ejecute el siguiente comando para comprobar si el código funciona como se espera: @@ -251,7 +255,7 @@ Orden de crecimiento de los algoritmos especificados en la notación O grande. Fuente: [Big O Cheat Sheet](http://bigocheatsheet.com/). -A continuación se muestra la lista de algunas de las notaciones de Big O más utilizadas y sus comparaciones de rendimiento +A continuación se muestra la lista de algunas de las notaciones de Big O más utilizadas y sus comparaciones de rendimiento frente a diferentes tamaños de los datos de entrada. | Notación O grande | Cálculos para 10 elementos | Cálculos para 100 elementos | Cálculos para 1000 elementos | diff --git a/README.fr-FR.md b/README.fr-FR.md index c522c591e3..bc24507eaa 100644 --- a/README.fr-FR.md +++ b/README.fr-FR.md @@ -3,11 +3,11 @@ [![Build Status](https://travis-ci.org/trekhleb/javascript-algorithms.svg?branch=master)](https://travis-ci.org/trekhleb/javascript-algorithms) [![codecov](https://codecov.io/gh/trekhleb/javascript-algorithms/branch/master/graph/badge.svg)](https://codecov.io/gh/trekhleb/javascript-algorithms) -Ce dépôt contient des exemples d'implémentation en JavaScript de plusieurs +Ce dépôt contient des exemples d'implémentation en JavaScript de plusieurs algorithmes et structures de données populaires. -Chaque algorithme et structure de donnée possède son propre README contenant -les explications détaillées et liens (incluant aussi des vidéos Youtube) pour +Chaque algorithme et structure de donnée possède son propre README contenant +les explications détaillées et liens (incluant aussi des vidéos Youtube) pour complément d'informations. _Lisez ceci dans d'autres langues:_ @@ -22,11 +22,11 @@ _Lisez ceci dans d'autres langues:_ ## Data Structures -Une structure de données est une manière spéciale d'organiser et de stocker -des données dans un ordinateur de manière à ce que l'on puisse accéder à -cette information et la modifier de manière efficiente. De manière plus -spécifique, une structure de données est un ensemble composé d'une collection -de valeurs, des relations entre ces valeurs ainsi que d'un ensemble de +Une structure de données est une manière spéciale d'organiser et de stocker +des données dans un ordinateur de manière à ce que l'on puisse accéder à +cette information et la modifier de manière efficiente. De manière plus +spécifique, une structure de données est un ensemble composé d'une collection +de valeurs, des relations entre ces valeurs ainsi que d'un ensemble de fonctions ou d'opérations pouvant être appliquées sur ces données. `B` - Débutant, `A` - Avancé @@ -51,8 +51,8 @@ fonctions ou d'opérations pouvant être appliquées sur ces données. ## Algorithmes -Un algorithme est une démarche non ambigüe expliquant comment résoudre une -classe de problèmes. C'est un ensemble de règles décrivant de manière précise +Un algorithme est une démarche non ambigüe expliquant comment résoudre une +classe de problèmes. C'est un ensemble de règles décrivant de manière précise une séquence d'opérations. `B` - Débutant, `A` - Avancé @@ -61,7 +61,7 @@ une séquence d'opérations. * **Math** * `B` [Manipulation de Bit](src/algorithms/math/bits) - définir/obtenir/mettre à jour/effacer les bits, multiplication/division par deux, négativiser etc. - * `B` [Factorielle](src/algorithms/math/factorial) + * `B` [Factorielle](src/algorithms/math/factorial) * `B` [Nombre de Fibonacci](src/algorithms/math/fibonacci) * `B` [Test de Primalité](src/algorithms/math/primality-test) (méthode du test de division) * `B` [Algorithme d'Euclide](src/algorithms/math/euclidean-algorithm) - calcule le Plus Grand Commun Diviseur (PGCD) @@ -128,16 +128,16 @@ une séquence d'opérations. * **Non catégorisé** * `B` [Tours de Hanoi](src/algorithms/uncategorized/hanoi-tower) * `B` [Rotation de Matrice Carrée](src/algorithms/uncategorized/square-matrix-rotation) - algorithme *in place* - * `B` [Jump Game](src/algorithms/uncategorized/jump-game) - retour sur trace, programmation dynamique (haut-bas + bas-haut) et exemples gourmands - * `B` [Chemins Uniques](src/algorithms/uncategorized/unique-paths) - retour sur trace, programmation dynamique (haut-bas + bas-haut) et exemples basés sur le Triangle de Pascal + * `B` [Jump Game](src/algorithms/uncategorized/jump-game) - retour sur trace, programmation dynamique (haut-bas + bas-haut) et exemples gourmands + * `B` [Chemins Uniques](src/algorithms/uncategorized/unique-paths) - retour sur trace, programmation dynamique (haut-bas + bas-haut) et exemples basés sur le Triangle de Pascal * `A` [Problème des N-Dames](src/algorithms/uncategorized/n-queens) * `A` [Problème du Cavalier](src/algorithms/uncategorized/knight-tour) ### Algorithmes par Paradigme -Un paradigme algorithmique est une méthode générique ou une approche qui -sous-tend la conception d'une classe d'algorithmes. C'est une abstraction -au-dessus de la notion d'algorithme, tout comme l'algorithme est une abstraction +Un paradigme algorithmique est une méthode générique ou une approche qui +sous-tend la conception d'une classe d'algorithmes. C'est une abstraction +au-dessus de la notion d'algorithme, tout comme l'algorithme est une abstraction supérieure à un programme informatique. * **Force Brute** - cherche parmi toutes les possibilités et retient la meilleure @@ -189,6 +189,10 @@ chemin différent pour tester d'autres solutions. Normalement, la traversée en ## Comment utiliser ce dépôt +Vous pouvez soit configurer ce référentiel localement en suivant les étapes ci-dessous, soit utiliser [gitpod.io](https://gitpod.io), un code VS en ligne gratuit comme l'IDE. Un simple clic permet de lancer un espace de travail prêt à coder. avec toutes les dépendances pré-installées de sorte que vous puissiez commencer à bidouiller avec le projet sans perdre un temps précieux sur la configuration du développement. + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/trekhleb/javascript-algorithms) + **Installer toutes les dépendances** ``` npm install @@ -214,11 +218,11 @@ npm test -- 'LinkedList' **Tests personnalisés** -Vous pouvez manipuler les structures de données et algorithmes présents dans ce -dépôt avec le fichier `./src/playground/playground.js` et écrire vos propres +Vous pouvez manipuler les structures de données et algorithmes présents dans ce +dépôt avec le fichier `./src/playground/playground.js` et écrire vos propres tests dans file `./src/playground/__test__/playground.test.js`. -Vous pourrez alors simplement exécuter la commande suivante afin de tester si +Vous pourrez alors simplement exécuter la commande suivante afin de tester si votre code fonctionne comme escompté ``` @@ -239,7 +243,7 @@ Comparaison de la performance d'algorithmes en notation Grand O. Source: [Big O Cheat Sheet](http://bigocheatsheet.com/). -Voici la liste de certaines des notations Grand O les plus utilisées et de leurs +Voici la liste de certaines des notations Grand O les plus utilisées et de leurs comparaisons de performance suivant différentes tailles pour les données d'entrée. | Notation Grand O | Opérations pour 10 éléments | Opérations pour 100 éléments | Opérations pour 1000 éléments | diff --git a/README.ja-JP.md b/README.ja-JP.md index 144ba508d1..a37f4ebd13 100644 --- a/README.ja-JP.md +++ b/README.ja-JP.md @@ -57,7 +57,7 @@ _Read this in other languages:_ * **数学** * `B` [ビット操作](src/algorithms/math/bits) - set/get/update/clear bits, 2つの乗算/除算, 否定的にする. 等 - * `B` [因果関係](src/algorithms/math/factorial) + * `B` [因果関係](src/algorithms/math/factorial) * `B` [フィボナッチ数](src/algorithms/math/fibonacci) - クラシックとクローズドフォームのバージョン * `B` [素数性テスト](src/algorithms/math/primality-test) (trial division 方法) * `B` [ユークリッドアルゴリズム](src/algorithms/math/euclidean-algorithm) - 最大公約数を計算する (GCD) @@ -115,7 +115,7 @@ _Read this in other languages:_ * **グラフ** * `B` [深度優先検索](src/algorithms/graph/depth-first-search) (DFS) * `B` [幅優先検索](src/algorithms/graph/breadth-first-search) (BFS) - * `B` [Kruskalのアルゴリズム](src/algorithms/graph/kruskal) - 重み付き無向グラフの最小スパニングツリー(MST)の発見 + * `B` [Kruskalのアルゴリズム](src/algorithms/graph/kruskal) - 重み付き無向グラフの最小スパニングツリー(MST)の発見 * `A` [Dijkstraアルゴリズム](src/algorithms/graph/dijkstra) - 単一の頂点からすべてのグラフ頂点への最短経路を見つける * `A` [Bellman-Fordアルゴリズム](src/algorithms/graph/bellman-ford) - 単一の頂点からすべてのグラフ頂点への最短経路を見つける * `A` [Floyd-Warshallアルゴリズム](src/algorithms/graph/floyd-warshall) - すべての頂点ペア間の最短経路を見つける @@ -201,6 +201,10 @@ _Read this in other languages:_ ## このリポジトリの使い方 +以下の手順に従ってこのリポジトリをローカルでセットアップするか、[gitpod.io](https://gitpod.io)IDEのような無料のオンラインVS-Codeを使用して、シングルクリックですぐにコーディングできるワークスペースを起動できます。 すべての依存関係が事前にインストールされているため、開発セットアップに貴重な時間を費やすことなく、プロジェクトのハッキングを開始できます。 + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/trekhleb/javascript-algorithms) + **すべての依存関係をインストールする** ``` npm install diff --git a/README.ko-KR.md b/README.ko-KR.md index a42c8fe81c..a658187750 100644 --- a/README.ko-KR.md +++ b/README.ko-KR.md @@ -22,7 +22,7 @@ _Read this in other languages:_ 자료 구조는 데이터를 특정 방식으로 구성하고 저장함으로써 더 효율적으로 접근하고 수정할 수 있게 해줍니다. 간단히 말해, 자료 구조는 데이터 값들, -데이터 간의 관계, 그리고 데이터를 다룰 수 있는 함수와 작업의 모임입니다. +데이터 간의 관계, 그리고 데이터를 다룰 수 있는 함수와 작업의 모임입니다. `B` - 입문자, `A` - 숙련자 @@ -47,8 +47,8 @@ _Read this in other languages:_ ## 알고리즘 -알고리즘은 어떤 종류의 문제를 풀 수 있는 정확한 방법이며, -일련의 작업을 정확하게 정의해 놓은 규칙들입니다. +알고리즘은 어떤 종류의 문제를 풀 수 있는 정확한 방법이며, +일련의 작업을 정확하게 정의해 놓은 규칙들입니다. `B` - 입문자, `A` - 숙련자 @@ -56,7 +56,7 @@ _Read this in other languages:_ * **Math** * `B` [Bit Manipulation](src/algorithms/math/bits) - set/get/update/clear bits, 2의 곱 / 나누기, 음수로 만들기 etc. - * `B` [팩토리얼](src/algorithms/math/factorial) + * `B` [팩토리얼](src/algorithms/math/factorial) * `B` [피보나치 수](src/algorithms/math/fibonacci) * `B` [소수 판별](src/algorithms/math/primality-test) (trial division 방식) * `B` [유클리드 호제법](src/algorithms/math/euclidean-algorithm) - 최대공약수 (GCD) @@ -123,7 +123,7 @@ _Read this in other languages:_ * **Uncategorized** * `B` [하노이 탑](src/algorithms/uncategorized/hanoi-tower) * `B` [정방 행렬 회전](src/algorithms/uncategorized/square-matrix-rotation) - 제자리(in-place) 알고리즘 - * `B` [점프 게임](src/algorithms/uncategorized/jump-game) - 백트래킹, 동적계획법 (top-down + bottom-up), 탐욕 알고리즘 예제 + * `B` [점프 게임](src/algorithms/uncategorized/jump-game) - 백트래킹, 동적계획법 (top-down + bottom-up), 탐욕 알고리즘 예제 * `B` [Unique 경로](src/algorithms/uncategorized/unique-paths) - 백트래킹, 동적계획법, 파스칼 삼각형에 기반한 예제 * `B` [빗물 담기 문제](src/algorithms/uncategorized/rain-terraces) - trapping rain water problem (동적계획법, 브루트포스 버전) * `A` [N-Queens 문제](src/algorithms/uncategorized/n-queens) @@ -183,6 +183,10 @@ _Read this in other languages:_ ## 이 저장소의 사용법 +아래 단계에 따라이 리포지토리를 로컬로 설정하거나 IDE와 같은 무료 온라인 VS 코드를 [gitpod.io](https://gitpod.io) 사용할 수 있습니다. 모든 의존성이 사전 설치되어 있으므로 개발 설정에 귀중한 시간을 낭비하지 않고 프로젝트를 해킹 할 수 있습니다. + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/trekhleb/javascript-algorithms) + **모든 종속 모듈들 설치** ``` npm install diff --git a/README.md b/README.md index 1c3200efee..0853127366 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ _Read this in other languages:_ [_Español_](README.es-ES.md), [_Português_](README.pt-BR.md) -*☝ Note that this project is meant to be used for learning and researching purposes +*☝ 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.* ## Data Structures @@ -61,7 +61,7 @@ a set of rules that precisely define a sequence of operations. * **Math** * `B` [Bit Manipulation](src/algorithms/math/bits) - set/get/update/clear bits, multiplication/division by two, make negative etc. - * `B` [Factorial](src/algorithms/math/factorial) + * `B` [Factorial](src/algorithms/math/factorial) * `B` [Fibonacci Number](src/algorithms/math/fibonacci) - classic and closed-form versions * `B` [Primality Test](src/algorithms/math/primality-test) (trial division method) * `B` [Euclidean Algorithm](src/algorithms/math/euclidean-algorithm) - calculate the Greatest Common Divisor (GCD) @@ -75,7 +75,7 @@ a set of rules that precisely define a sequence of operations. * `A` [Integer Partition](src/algorithms/math/integer-partition) * `A` [Square Root](src/algorithms/math/square-root) - Newton's method * `A` [Liu Hui π Algorithm](src/algorithms/math/liu-hui) - approximate π calculations based on N-gons - * `A` [Discrete Fourier Transform](src/algorithms/math/fourier-transform) - decompose a function of time (a signal) into the frequencies that make it up + * `A` [Discrete Fourier Transform](src/algorithms/math/fourier-transform) - decompose a function of time (a signal) into the frequencies that make it up * **Sets** * `B` [Cartesian Product](src/algorithms/sets/cartesian-product) - product of multiple sets * `B` [Fisher–Yates Shuffle](src/algorithms/sets/fisher-yates) - random permutation of a finite sequence @@ -140,8 +140,8 @@ a set of rules that precisely define a sequence of operations. * **Uncategorized** * `B` [Tower of Hanoi](src/algorithms/uncategorized/hanoi-tower) * `B` [Square Matrix Rotation](src/algorithms/uncategorized/square-matrix-rotation) - in-place algorithm - * `B` [Jump Game](src/algorithms/uncategorized/jump-game) - backtracking, dynamic programming (top-down + bottom-up) and greedy examples - * `B` [Unique Paths](src/algorithms/uncategorized/unique-paths) - backtracking, dynamic programming and Pascal's Triangle based examples + * `B` [Jump Game](src/algorithms/uncategorized/jump-game) - backtracking, dynamic programming (top-down + bottom-up) and greedy examples + * `B` [Unique Paths](src/algorithms/uncategorized/unique-paths) - backtracking, dynamic programming and Pascal's Triangle based examples * `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) * `A` [N-Queens Problem](src/algorithms/uncategorized/n-queens) @@ -214,6 +214,10 @@ tree is being used. ## How to use this repository +You can either set up this repository locally by following the steps below or use [gitpod.io](https://gitpod.io) a free online VS-Code like IDE, with a single click it will launch a ready to code workspace with all the dependencies pre-installed so that you can start hacking around with the project without wasting any precious time on the development setup. + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/trekhleb/javascript-algorithms) + **Install all dependencies** ``` npm install diff --git a/README.pl-PL.md b/README.pl-PL.md index 4aa25e8d37..c2446cc006 100644 --- a/README.pl-PL.md +++ b/README.pl-PL.md @@ -3,11 +3,11 @@ [![Build Status](https://travis-ci.org/trekhleb/javascript-algorithms.svg?branch=master)](https://travis-ci.org/trekhleb/javascript-algorithms) [![codecov](https://codecov.io/gh/trekhleb/javascript-algorithms/branch/master/graph/badge.svg)](https://codecov.io/gh/trekhleb/javascript-algorithms) -To repozytorium zawiera wiele przykładów JavaScript opartych na +To repozytorium zawiera wiele przykładów JavaScript opartych na znanych algorytmach i strukturach danych. Każdy algorytm i struktura danych zawiera osobny plik README -wraz z powiązanymi wyjaśnieniami i odnośnikami do dalszego czytania +wraz z powiązanymi wyjaśnieniami i odnośnikami do dalszego czytania (włącznie z tymi do YouTube videos). _Read this in other languages:_ @@ -22,10 +22,10 @@ _Read this in other languages:_ ## Struktury Danych -Struktura danych to sposób uporządkowania i przechowywania informacji w +Struktura danych to sposób uporządkowania i przechowywania informacji w komputerze żeby mogłaby być sprawnie dostępna i efektywnie zmodyfikowana. -Dokładniej, struktura danych jest zbiorem wartości danych, relacjami -pomiędzy nimi, zadaniami lub działaniami, które mogą dotyczyć danych. +Dokładniej, struktura danych jest zbiorem wartości danych, relacjami +pomiędzy nimi, zadaniami lub działaniami, które mogą dotyczyć danych. `B` - Początkujący, `A` - Zaawansowany @@ -49,8 +49,8 @@ pomiędzy nimi, zadaniami lub działaniami, które mogą dotyczyć danych. ## Algorytmy -Algorytm jest to skończony ciąg jasno zdefiniowanych czynności, koniecznych -do wykonania pewnego rodzaju zadań. Sposób postępowania prowadzący do +Algorytm jest to skończony ciąg jasno zdefiniowanych czynności, koniecznych +do wykonania pewnego rodzaju zadań. Sposób postępowania prowadzący do rozwiązania problemu. `B` - Początkujący, `A` - Zaawansowany @@ -59,7 +59,7 @@ rozwiązania problemu. * **Matematyka** * `B` [Manipulacja Bitami](src/algorithms/math/bits) - ustaw / uzyskaj / aktualizuj / usuwaj bity, mnożenie / dzielenie przez dwa, tworzenie negatywów itp. - * `B` [Silna](src/algorithms/math/factorial) + * `B` [Silna](src/algorithms/math/factorial) * `B` [Ciąg Fibonacciego](src/algorithms/math/fibonacci) * `B` [Test Pierwszorzędności](src/algorithms/math/primality-test) (metoda podziału na próby) * `B` [Algorytm Euclideana](src/algorithms/math/euclidean-algorithm) - obliczyć Największy Wspólny Dzielnik (GCD) @@ -78,9 +78,9 @@ rozwiązania problemu. * `A` [Najdłuższa Wspólna Podsekwencja](src/algorithms/sets/longest-common-subsequence) (LCS) * `A` [Najdłuższa Wzrostająca Podsekwencja](src/algorithms/sets/longest-increasing-subsequence) * `A` [Najkrótsza Wspólna Supersekwencja](src/algorithms/sets/shortest-common-supersequence) (SCS) - * `A` [Problem Knapsacka](src/algorithms/sets/knapsack-problem) - "0/1" i "Rozwiązany" + * `A` [Problem Knapsacka](src/algorithms/sets/knapsack-problem) - "0/1" i "Rozwiązany" * `A` [Maksymalna Podtablica](src/algorithms/sets/maximum-subarray) - "Metoda Siłowa" i "Dynamiczne Programowanie" (Kadane-a) wersje - * `A` [Suma Kombinacji](src/algorithms/sets/combination-sum) - + * `A` [Suma Kombinacji](src/algorithms/sets/combination-sum) - znajdź wszystkie kombinacje, które tworzą określoną sumę * **Łańcuchy** * `B` [Odległość Hamminga](src/algorithms/string/hamming-distance) - liczba pozycji, w których symbole są różne @@ -117,26 +117,26 @@ znajdź wszystkie kombinacje, które tworzą określoną sumę * `A` [Algorytm Floyd-Warshalla](src/algorithms/graph/floyd-warshall) - znajdź najkrótsze ścieżki między wszystkimi parami wierzchołków * `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) * `A` [Algorytm Prima](src/algorithms/graph/prim) - znalezienie Minimalnego Drzewa Opinającego (MST) dla ważonego nieukierunkowanego wykresu - * `A` [Sortowanie Topologiczne](src/algorithms/graph/topological-sorting) - metoda DFS + * `A` [Sortowanie Topologiczne](src/algorithms/graph/topological-sorting) - metoda DFS * `A` [Punkty Artykulacji](src/algorithms/graph/articulation-points) - Algorytm Tarjana (oparty o DFS) - * `A` [Mosty](src/algorithms/graph/bridges) - Oparty na algorytmie DFS + * `A` [Mosty](src/algorithms/graph/bridges) - Oparty na algorytmie DFS * `A` [Ścieżka Euleriana i Obwód Euleriana](src/algorithms/graph/eulerian-path) - Algorytm Fleurya - Odwiedź każdą krawędź dokładnie raz * `A` [Cykl Hamiltoniana](src/algorithms/graph/hamiltonian-cycle) - Odwiedź każdy wierzchołek dokładnie raz - * `A` [Silnie Połączone Komponenty](src/algorithms/graph/strongly-connected-components) - Algorytm Kosaraja + * `A` [Silnie Połączone Komponenty](src/algorithms/graph/strongly-connected-components) - Algorytm Kosaraja * `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 * **Niezkategorizowane** * `B` [Wieża Hanoi](src/algorithms/uncategorized/hanoi-tower) * `B` [Kwadratowa Matryca Obrotu](src/algorithms/uncategorized/square-matrix-rotation) - algorytm w miejscu - * `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 + * `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 * `B` [Unikatowe Ścieżki](src/algorithms/uncategorized/unique-paths) - cofanie, dynamiczne programowanie i przykłady oparte na Trójkącie Pascala * `A` [Problem N-Queens](src/algorithms/uncategorized/n-queens) * `A` [Knight's Tour](src/algorithms/uncategorized/knight-tour) ### Algorytmy według paradygmatu -Paradygmat algorytmiczny jest ogólną metodą lub podejściem, które jest -podstawą projektowania klasy algorytmów. Jest abstrakcją wyższą niż -pojęcie algorytmu, podobnie jak algorytm jest abstrakcją wyższą niż +Paradygmat algorytmiczny jest ogólną metodą lub podejściem, które jest +podstawą projektowania klasy algorytmów. Jest abstrakcją wyższą niż +pojęcie algorytmu, podobnie jak algorytm jest abstrakcją wyższą niż program komputerowy. * **Metoda Siłowa** - Sprawdza wszystkie możliwosci i wybiera najlepsze rozwiązanie. @@ -146,7 +146,7 @@ program komputerowy. * **Chciwy** - wybierz najlepszą opcję w obecnym czasie, bez względu na przyszłość * `B` [Jump Game](src/algorithms/uncategorized/jump-game) * `A` [Niezwiązany Problem Knapsacka ](src/algorithms/sets/knapsack-problem) - * `A` [Algorytm Dijkstry](src/algorithms/graph/dijkstra) - + * `A` [Algorytm Dijkstry](src/algorithms/graph/dijkstra) - znalezienie najkrótszej ścieżki do wszystkich wierzchołków grafu * `A` [Algorytm Prima](src/algorithms/graph/prim) - znalezienie Minimalnego Drzewa Opinającego (MST) dla ważonego nieukierunkowanego wykresu * `A` [Algorytm Kruskala](src/algorithms/graph/kruskal) - znalezienie Minimalnego Drzewa Opinającego (MST) dla ważonego nieukierunkowanego wykresu @@ -175,7 +175,7 @@ znalezienie najkrótszej ścieżki do wszystkich wierzchołków grafu * `A` [Partycja Całkowita](src/algorithms/math/integer-partition) * `A` [Maksymalne Podtablice](src/algorithms/sets/maximum-subarray) * `A` [Algorytm Bellman-Forda](src/algorithms/graph/bellman-ford) - znalezienie najkrótszej ścieżki wszystkich wierzchołków wykresu - * `A` [Algorytm Floyd-Warshalla](src/algorithms/graph/floyd-warshall) - + * `A` [Algorytm Floyd-Warshalla](src/algorithms/graph/floyd-warshall) - znajdź najkrótsze ścieżki między wszystkimi parami wierzchołków * `A` [Dopasowanie Wyrażeń Regularnych](src/algorithms/string/regular-expression-matching) * **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 @@ -189,11 +189,15 @@ jeżeli zaspokaja wszystkie warunki, tylko wtedy generuje kolejne rozwiązania. * **Metoda Podziału i Ograniczeń** - Pamięta o niskonakładowym rozwiązaniu znalezionym na każdym etapie szukania nawrotu, używa kosztu niskonakładowego kosztu, które dotychczas zostało znalezione jako niska granica najmniejszego kosztu do rozwiązanie problemu, aby odrzucić cząstkowe rozwiązania o kosztach większych niż niskonakładowe -rozwiązanie znalezione do tej pory. +rozwiązanie znalezione do tej pory. Zazwyczan trajektoria BFS, w połączeniu z trajektorią Przeszukiwania W Głąb (DFS) drzewa przestrzeni stanów jest użyte. ## Jak używać repozytorium +Możesz albo skonfigurować to repozytorium lokalnie, wykonując poniższe czynności, albo użyć [gitpod.io](https://gitpod.io) darmowego internetowego kodu VS, takiego jak IDE, jednym kliknięciem uruchomi on gotowy do pracy obszar roboczy ze wstępnie zainstalowanymi wszystkimi zależnościami, abyś mógł rozpocząć hackowanie przy projekcie bez marnowania cennego czasu na konfigurację programistyczną. + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/trekhleb/javascript-algorithms) + **Zainstaluj wszystkie zależnosci** ``` npm install @@ -222,7 +226,7 @@ npm test -- 'LinkedList' Możesz pociwiczyć ze strukturą danych i algorytmami w `./src/playground/playground.js` zakartotekuj i napisz testy do tego w `./src/playground/__test__/playground.test.js`. -Następnie uruchom następującą komendę w celu przetestowania czy twoje kod działa według oczekiwań: +Następnie uruchom następującą komendę w celu przetestowania czy twoje kod działa według oczekiwań: ``` npm test -- 'playground' @@ -236,7 +240,7 @@ npm test -- 'playground' ### Big O Notacja -Kolejność wzrastania algorytmów według Big O notacji. +Kolejność wzrastania algorytmów według Big O notacji. ![Big O grafy](./assets/big-o-graph.png) diff --git a/README.pt-BR.md b/README.pt-BR.md index 6858121df1..4819d1b8ea 100644 --- a/README.pt-BR.md +++ b/README.pt-BR.md @@ -4,7 +4,7 @@ [![codecov](https://codecov.io/gh/trekhleb/javascript-algorithms/branch/master/graph/badge.svg)](https://codecov.io/gh/trekhleb/javascript-algorithms) Este repositório contém exemplos baseados em JavaScript de muitos -algoritmos e estruturas de dados populares. +algoritmos e estruturas de dados populares. Cada algoritmo e estrutura de dado possui seu próprio README com explicações relacionadas e links para leitura adicional (incluindo @@ -58,7 +58,7 @@ um conjunto de regras que define precisamente uma sequência de operações. * **Matemática** * `B` [Manipulação Bit](src/algorithms/math/bits) - set/get/update/clear bits, multiplicação / divisão por dois, tornar negativo etc. - * `B` [Fatorial](src/algorithms/math/factorial) + * `B` [Fatorial](src/algorithms/math/factorial) * `B` [Número de Fibonacci](src/algorithms/math/fibonacci) * `B` [Teste de Primalidade](src/algorithms/math/primality-test) (método de divisão experimental) * `B` [Algoritmo Euclidiano](src/algorithms/math/euclidean-algorithm) - calcular o maior divisor comum (GCD) @@ -116,7 +116,7 @@ um conjunto de regras que define precisamente uma sequência de operações. * `A` [Floyd-Warshall Algorithm](src/algorithms/graph/floyd-warshall) - encontrar caminhos mais curtos entre todos os pares de vértices * `A` [Detect Cycle](src/algorithms/graph/detect-cycle) - para gráficos direcionados e não direcionados (versões baseadas em DFS e Conjunto Disjuntivo) * `A` [Prim’s Algorithm](src/algorithms/graph/prim) - encontrando Árvore Mínima de Abrangência (MST) para grafo não direcionado ponderado - * `A` [Topological Sorting](src/algorithms/graph/topological-sorting) - Métodos DFS + * `A` [Topological Sorting](src/algorithms/graph/topological-sorting) - Métodos DFS * `A` [Articulation Points](src/algorithms/graph/articulation-points) -O algoritmo de Tarjan (baseado em DFS) * `A` [Bridges](src/algorithms/graph/bridges) - Algoritmo baseado em DFS * `A` [Eulerian Path and Eulerian Circuit](src/algorithms/graph/eulerian-path) - Algoritmo de Fleury - Visite todas as bordas exatamente uma vez @@ -195,6 +195,10 @@ solução de menor custo encontrada até o momento. Normalmente, a travessia BFS ## Como usar este repositório +Você pode configurar este repositório localmente seguindo as etapas abaixo ou usar [gitpod.io] (https://gitpod.io) um código VS on-line gratuito como IDE, com um único clique, ele abrirá uma área de trabalho pronta para codificar com todas as dependências pré-instaladas para que você possa começar a explorar o projeto sem perder tempo precioso na configuração de desenvolvimento. + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/trekhleb/javascript-algorithms) + **Instalar todas as dependências** ``` npm install diff --git a/README.zh-CN.md b/README.zh-CN.md index 0f33c608f0..a6d8e3758d 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -195,6 +195,10 @@ _Read this in other languages:_ ## 如何使用本仓库 +您可以按照以下步骤在本地设置此存储库,也可以使用[gitpod.io](https://gitpod.io)这样的免费在线VS-IDE等VS-Code,只需单击一下,它将启动一个即可编写代码的工作区 预先安装了所有依赖项,这样您就可以开始研究该项目,而不会在开发设置上浪费任何宝贵的时间。 + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/trekhleb/javascript-algorithms) + **安装依赖** ``` npm install diff --git a/README.zh-TW.md b/README.zh-TW.md index 8af7e1fae6..75d1bea26d 100644 --- a/README.zh-TW.md +++ b/README.zh-TW.md @@ -139,6 +139,10 @@ _Read this in other languages:_ ## 如何使用本知識庫 +您可以按照以下步驟在本地設置此存儲庫,也可以使用[gitpod.io](https://gitpod.io)這樣的免費在線VS-IDE等VS-Code,只需單擊一下,它將啟動一個即可編寫代碼的工作區 預先安裝了所有依賴項,這樣您就可以開始研究該項目,而不會在開發設置上浪費任何寶貴的時間。 + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/trekhleb/javascript-algorithms) + **安裝所有必須套件** ```