From ae869ef3faf4f7547e6b047a1d48f45927dd76a4 Mon Sep 17 00:00:00 2001 From: Omotayo Obafemi <obafemitayor@gmail.com> Date: Sun, 1 Oct 2023 13:21:29 +0100 Subject: [PATCH 1/5] Added algorithm problem that can be solved using stack data structure --- README.md | 2 + .../stack/valid-parentheses/README.md | 44 +++++++++++++++++++ .../__test__/validParentheses.test.js | 23 ++++++++++ .../valid-parentheses/validParentheses.js | 42 ++++++++++++++++++ 4 files changed, 111 insertions(+) create mode 100644 src/algorithms/stack/valid-parentheses/README.md create mode 100644 src/algorithms/stack/valid-parentheses/__test__/validParentheses.test.js create mode 100644 src/algorithms/stack/valid-parentheses/validParentheses.js diff --git a/README.md b/README.md index a20673989c..da1d9dda10 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,8 @@ 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) diff --git a/src/algorithms/stack/valid-parentheses/README.md b/src/algorithms/stack/valid-parentheses/README.md new file mode 100644 index 0000000000..31d7fd60f3 --- /dev/null +++ b/src/algorithms/stack/valid-parentheses/README.md @@ -0,0 +1,44 @@ +# Valid Parentheses Problem + +Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. + +An input string is valid if: + +Open brackets must be closed by the same type of brackets. +Open brackets must be closed in the correct order. +Every close bracket has a corresponding open bracket of the same type. + + +Example 1: + +`Input: s = "()"` + +Output: true + +Example 2: + +`Input: s = "()[]{}"` + +Output: true + +Example 3: + +`Input: s = "(]"` + +Output: false + +This is actually a very common interview question and a very good example of how to use a stack data structure to solve problems. + +## Solution +The problem can be solved in two ways + +### Bruteforce Approach +We can iterate through the string and then for each character in the string, we check for it's last closing character in the the string. Once we find the last closing character in the string, we remove both characters and then repeat the iteration, if we don't find a closing character for an opening character, then the string is invalid. The time complexity of this would be O(n^2) which is not so efficient. + +### Using a Stack +We can use a hashtable to store all opening characters and the value would be the respective closing character. We can then iterate through the string and if we encounter an opening parantheses, we push it's closing character to the stack. If we ecounter a closing paraentheses, then we pop the stack and confirm that the popped element is equal to the current closing parentheses character. If it is not then the string is invalid. At the end of the iteration, we also need to check that the stack is empty. If it is not then the string is invalid. If it is, then the string is valid. This is a more efficient approach with a Time complexity and Space complexity of O(n). + + +## References + +- [Leetcode](https://leetcode.com/problems/valid-parentheses/) diff --git a/src/algorithms/stack/valid-parentheses/__test__/validParentheses.test.js b/src/algorithms/stack/valid-parentheses/__test__/validParentheses.test.js new file mode 100644 index 0000000000..e286688dfd --- /dev/null +++ b/src/algorithms/stack/valid-parentheses/__test__/validParentheses.test.js @@ -0,0 +1,23 @@ +import isValid from '../validParentheses'; + +describe('validParentheses', () => { + it('should return false when string is empty', () => { + expect(isValid('')).toBe(false); + }); + + it('should return true when string contains valid parentheses in correct order', () => { + expect(isValid('()')).toBe(true); + expect(isValid('()[]{}')).toBe(true); + expect(isValid('((({[]})))')).toBe(true); + }); + + it('should return false when string contains invalid parentheses', () => { + expect(isValid('(]')).toBe(false); + expect(isValid('()[]{} }')).toBe(false); + expect(isValid('((({[(]})))')).toBe(false); + }); + + it('should return false when string contains valid parentheses in wrong order', () => { + expect(isValid('({)}')).toBe(false); + }); +}); diff --git a/src/algorithms/stack/valid-parentheses/validParentheses.js b/src/algorithms/stack/valid-parentheses/validParentheses.js new file mode 100644 index 0000000000..a327780768 --- /dev/null +++ b/src/algorithms/stack/valid-parentheses/validParentheses.js @@ -0,0 +1,42 @@ +import Stack from '../../../data-structures/stack/Stack'; +import HashTable from '../../../data-structures/hash-table/HashTable'; + +// Declare hashtable containg opening parentheses as key and it's closing parentheses as value. +const hashTable = new HashTable(3); +hashTable.set('{', '}'); +hashTable.set('(', ')'); +hashTable.set('[', ']'); + +/** + * Check if string has valid parentheses. + * + * @param {string} parenthesesString + * @return {boolean} + */ +export default function isValid(parenthesesString) { + // If string is empty return false + if (parenthesesString.length === 0) { + return false; + } + // Create stack + const stack = new Stack(); + + // Loop through each character of string + for (let i = 0; i < parenthesesString.length; i += 1) { + const currentCharacter = parenthesesString[i]; + // If character is opening parentheses push it's closing parentheses to stack + if (hashTable.has(currentCharacter)) { + stack.push(hashTable.get(currentCharacter)); + } else { + /* If character is a closing parentheses then,: + check If stack is empty, if it is return false. + if stack is not empty, pop from stack and compare it with current character. + If they are not same return false. */ + if (stack.isEmpty() || stack.pop() !== currentCharacter) { + return false; + } + } + } + // If stack is empty return true else return false + return stack.isEmpty(); +} From 49e0814c434d52c66403a19f0c8c05bd2dfa6628 Mon Sep 17 00:00:00 2001 From: Gianfranco P <899175+gianpaj@users.noreply.github.com> Date: Fri, 20 Dec 2024 19:35:01 +0000 Subject: [PATCH 2/5] "Italiano" is "italian" in italian :) --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index da1d9dda10..ace86b9c0b 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ _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), @@ -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 @@ -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) @@ -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 @@ -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 @@ -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' @@ -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.  From bd4990955bdd4f06a37d3baa16b6a7910a8401dc Mon Sep 17 00:00:00 2001 From: Maxwell Knight <maxwell.knight98@gmail.com> Date: Tue, 15 Oct 2024 11:04:00 +0300 Subject: [PATCH 3/5] feat: Added hebrew translation to README in all languages --- README.ar-AR.md | 1 + README.de-DE.md | 1 + README.es-ES.md | 1 + README.fr-FR.md | 1 + README.he-HE.md | 370 ++++++++++++++++++++++++++++++++++++++++++++++++ README.id-ID.md | 1 + README.it-IT.md | 1 + README.ja-JP.md | 1 + README.ko-KR.md | 1 + README.md | 3 +- README.pl-PL.md | 1 + README.pt-BR.md | 1 + README.ru-RU.md | 1 + README.tr-TR.md | 1 + README.uk-UA.md | 1 + README.uz-UZ.md | 1 + README.vi-VN.md | 41 +++--- README.zh-CN.md | 1 + README.zh-TW.md | 1 + 19 files changed, 409 insertions(+), 21 deletions(-) create mode 100644 README.he-HE.md diff --git a/README.ar-AR.md b/README.ar-AR.md index 81c9c91a6f..39997e24a5 100644 --- a/README.ar-AR.md +++ b/README.ar-AR.md @@ -25,6 +25,7 @@ _اقرأ هذا في لغات أخرى:_ [_Tiếng Việt_](README.vi-VN.md), [_Deutsch_](README.de-DE.md), [_Uzbek_](README.uz-UZ.md) +[_עברית_](README.he-HE.md) ☝ ملاحضة هذا المشروع مخصص للاستخدام لأغراض التعلم والبحث فقط ، و ** ليست ** معدة للاستخدام في **الإنتاج** diff --git a/README.de-DE.md b/README.de-DE.md index 9663f7b06b..e8f1b4b22b 100644 --- a/README.de-DE.md +++ b/README.de-DE.md @@ -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-HE.md) _☝ Beachte, dass dieses Projekt nur für Lern- und Forschungszwecke gedacht ist und **nicht** für den produktiven Einsatz verwendet werden soll_ diff --git a/README.es-ES.md b/README.es-ES.md index e6879a19cd..de4d6889f8 100644 --- a/README.es-ES.md +++ b/README.es-ES.md @@ -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-HE.md) *☝ Nótese que este proyecto está pensado con fines de aprendizaje e investigación, y **no** para ser usado en producción.* diff --git a/README.fr-FR.md b/README.fr-FR.md index be8258befd..d24d5db915 100644 --- a/README.fr-FR.md +++ b/README.fr-FR.md @@ -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-HE.md) ## Data Structures diff --git a/README.he-HE.md b/README.he-HE.md new file mode 100644 index 0000000000..43ef196e60 --- /dev/null +++ b/README.he-HE.md @@ -0,0 +1,370 @@ +# אלגוריתמים ומבני נתונים ב-JavaScript + +[](https://github.com/trekhleb/javascript-algorithms/actions?query=workflow%3ACI+branch%3Amaster) +[](https://codecov.io/gh/trekhleb/javascript-algorithms) + + +מאגר זה מכיל דוגמאות מבוססות JavaScript של אלגוריתמים ומבני נתונים פופולריים רבים. + +לכל אלגוריתם ומבנה נתונים יש README משלו עם הסברים קשורים וקישורים לקריאה נוספת (כולל קישורים לסרטוני YouTube). + +_קרא זאת בשפות אחרות:_ +[_简体中文_](README.zh-CN.md), +[_繁體中文_](README.zh-TW.md), +[_한국어_](README.ko-KR.md), +[_日本語_](README.ja-JP.md), +[_Polski_](README.pl-PL.md), +[_Français_](README.fr-FR.md), +[_Español_](README.es-ES.md), +[_Português_](README.pt-BR.md), +[_Русский_](README.ru-RU.md), +[_Türkçe_](README.tr-TR.md), +[_Italiana_](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) + +*☝ שים לב שפרויקט זה מיועד למטרות לימוד ומחקר בלבד, ואינו מיועד לשימוש בייצור.* + +## מבני נתונים + +מבנה נתונים הוא דרך מסוימת לארגן ולאחסן נתונים במחשב כך שניתן לגשת אליהם ולשנות אותם ביעילות. ליתר דיוק, מבנה נתונים הוא אוסף של ערכי נתונים, היחסים ביניהם, והפונקציות או הפעולות שניתן ליישם על הנתונים. + +זכור שלכל מבנה נתונים יש את היתרונות והחסרונות שלו. חשוב לשים לב יותר לסיבה שבגללה אתה בוחר מבנה נתונים מסוים מאשר לאופן היישום שלו. + +`B` - מתחיל, `A` - מתקדם + +* `B` [רשימה מקושרת](src/data-structures/linked-list) +* `B` [רשימה מקושרת כפולה](src/data-structures/doubly-linked-list) +* `B` [תור](src/data-structures/queue) +* `B` [מחסנית](src/data-structures/stack) +* `B` [טבלת גיבוב](src/data-structures/hash-table) +* `B` [ערימה](src/data-structures/heap) - גרסאות מקסימום ומינימום +* `B` [תור עדיפויות](src/data-structures/priority-queue) +* `A` [עץ תחיליות](src/data-structures/trie) +* `A` [עץ](src/data-structures/tree) + * `A` [עץ חיפוש בינארי](src/data-structures/tree/binary-search-tree) + * `A` [עץ AVL](src/data-structures/tree/avl-tree) + * `A` [עץ אדום-שחור](src/data-structures/tree/red-black-tree) + * `A` [עץ מקטעים](src/data-structures/tree/segment-tree) - עם דוגמאות לשאילתות מינימום/מקסימום/סכום של טווח + * `A` [עץ פנוויק](src/data-structures/tree/fenwick-tree) (עץ בינארי מאונדקס) +* `A` [גרף](src/data-structures/graph) (מכוון ולא מכוון) +* `A` [קבוצה מופרדת](src/data-structures/disjoint-set) - מבנה נתונים של איחוד-מציאה או מיזוג-מציאה +* `A` [מסנן בלום](src/data-structures/bloom-filter) +* `A` [מטמון LRU](src/data-structures/lru-cache/) - מטמון פחות שימוש לאחרונה (LRU) + +## אלגוריתמים + +אלגוריתם הוא מפרט חד משמעי כיצד לפתור סוג של בעיות. זוהי קבוצה של כללים המגדירים במדויק רצף של פעולות. + +`B` - מתחיל, `A` - מתקדם + +### אלגוריתמים לפי נושא + +* **מתמטיקה** + * `B` [מניפולציה על ביטים](src/algorithms/math/bits) - קביעה/עדכון/ניקוי ביטים, הכפלה/חילוק ב-2, הפיכה לשלילי וכו' + * `B` [נקודה צפה בינארית](src/algorithms/math/binary-floating-point) - ייצוג בינארי של מספרים בנקודה צפה + * `B` [פקטוריאל](src/algorithms/math/factorial) + * `B` [מספר פיבונאצ'י](src/algorithms/math/fibonacci) - גרסאות קלאסיות וסגורות + * `B` [גורמים ראשוניים](src/algorithms/math/prime-factors) - מציאת גורמים ראשוניים וספירתם באמצעות משפט הארדי-רמנוג'אן + * `B` [בדיקת ראשוניות](src/algorithms/math/primality-test) (שיטת החלוקה הניסיונית) + * `B` [אלגוריתם אוקלידס](src/algorithms/math/euclidean-algorithm) - חישוב המחלק המשותף הגדול ביותר (GCD) + * `B` [המכפיל המשותף הקטן ביותר](src/algorithms/math/least-common-multiple) (LCM) + * `B` [נפה של ארטוסתנס](src/algorithms/math/sieve-of-eratosthenes) - מציאת כל המספרים הראשוניים עד לגבול כלשהו + * `B` [האם חזקה של שתיים](src/algorithms/math/is-power-of-two) - בדיקה אם מספר הוא חזקה של שתיים (אלגוריתמים נאיביים וביטיים) + * `B` [משולש פסקל](src/algorithms/math/pascal-triangle) + * `B` [מספר מרוכב](src/algorithms/math/complex-number) - מספרים מרוכבים ופעולות בסיסיות עליהם + * `B` [רדיאן ומעלות](src/algorithms/math/radian) - המרה מרדיאנים למעלות ובחזרה + * `B` [חזקה מהירה](src/algorithms/math/fast-powering) + * `B` [שיטת הורנר](src/algorithms/math/horner-method) - הערכת פולינום + * `B` [מטריצות](src/algorithms/math/matrix) - מטריצות ופעולות בסיסיות על מטריצות (כפל, טרנספוזיציה וכו') + * `B` [מרחק אוקלידי](src/algorithms/math/euclidean-distance) - מרחק בין שתי נקודות/וקטורים/מטריצות + * `A` [חלוקת מספר שלם](src/algorithms/math/integer-partition) + * `A` [שורש ריבועי](src/algorithms/math/square-root) - שיטת ניוטון + * `A` [אלגוריתם π של ליו הוי](src/algorithms/math/liu-hui) - חישובי π מקורבים על בסיס N-גונים + * `A` [התמרת פורייה הבדידה](src/algorithms/math/fourier-transform) - פירוק פונקציה של זמן (אות) לתדרים המרכיבים אותה + +* **קבוצות** + * `B` [מכפלה קרטזית](src/algorithms/sets/cartesian-product) - מכפלה של מספר קבוצות + * `B` [ערבוב פישר-ייטס](src/algorithms/sets/fisher-yates) - תמורה אקראית של רצף סופי + * `A` [קבוצת חזקה](src/algorithms/sets/power-set) - כל תתי הקבוצות של קבוצה (פתרונות ביטיים, מעקב לאחור וקסקדה) + * `A` [תמורות](src/algorithms/sets/permutations) (עם ובלי חזרות) + * `A` [צירופים](src/algorithms/sets/combinations) (עם ובלי חזרות) + * `A` [תת-רצף משותף ארוך ביותר](src/algorithms/sets/longest-common-subsequence) (LCS) + * `A` [תת-רצף עולה ארוך ביותר](src/algorithms/sets/longest-increasing-subsequence) + * `A` [על-רצף משותף קצר ביותר](src/algorithms/sets/shortest-common-supersequence) (SCS) + * `A` [בעיית התרמיל](src/algorithms/sets/knapsack-problem) - "0/1" ו"לא מוגבל" + * `A` [תת-מערך מקסימלי](src/algorithms/sets/maximum-subarray) - "כוח ברוטלי" ו"תכנות דינמי" (Kadane) גרסאות + * `A` [סכום צירוף](src/algorithms/sets/combination-sum) - מציאת כל הצירופים שיוצרים סכום ספציפי + +* **מחרוזות** + * `B` [מרחק המינג](src/algorithms/string/hamming-distance) - מספר העמדות שבהן הסמלים שונים + * `B` [פלינדרום](src/algorithms/string/palindrome) - בדיקה אם המחרוזת זהה בקריאה לאחור + * `A` [מרחק לוונשטיין](src/algorithms/string/levenshtein-distance) - מרחק העריכה המינימלי בין שתי רצפים + * `A` [אלגוריתם קנות'-מוריס-פראט](src/algorithms/string/knuth-morris-pratt) (אלגוריתם KMP) - חיפוש תת-מחרוזת (התאמת תבנית) + * `A` [אלגוריתם Z](src/algorithms/string/z-algorithm) - חיפוש תת-מחרוזת (התאמת תבנית) + * `A` [אלגוריתם רבין קארפ](src/algorithms/string/rabin-karp) - חיפוש תת-מחרוזת + * `A` [תת-מחרוזת משותפת ארוכה ביותר](src/algorithms/string/longest-common-substring) + * `A` [התאמת ביטוי רגולרי](src/algorithms/string/regular-expression-matching) + +* **חיפושים** + * `B` [חיפוש לינארי](src/algorithms/search/linear-search) + * `B` [חיפוש קפיצות](src/algorithms/search/jump-search) (או חיפוש בלוקים) - חיפוש במערך ממוין + * `B` [חיפוש בינארי](src/algorithms/search/binary-search) - חיפוש במערך ממוין + * `B` [חיפוש אינטרפולציה](src/algorithms/search/interpolation-search) - חיפוש במערך ממוין עם התפלגות אחידה + +* **מיון** + * `B` [מיון בועות](src/algorithms/sorting/bubble-sort) + * `B` [מיון בחירה](src/algorithms/sorting/selection-sort) + * `B` [מיון הכנסה](src/algorithms/sorting/insertion-sort) + * `B` [מיון ערימה](src/algorithms/sorting/heap-sort) + * `B` [מיון מיזוג](src/algorithms/sorting/merge-sort) + * `B` [מיון מהיר](src/algorithms/sorting/quick-sort) - יישומים במקום ולא במקום + * `B` [מיון צדפות](src/algorithms/sorting/shell-sort) + * `B` [מיון ספירה](src/algorithms/sorting/counting-sort) + * `B` [מיון בסיס](src/algorithms/sorting/radix-sort) + * `B` [מיון דלי](src/algorithms/sorting/bucket-sort) + +* **רשימות מקושרות** + * `B` [מעבר ישר](src/algorithms/linked-list/traversal) + * `B` [מעבר הפוך](src/algorithms/linked-list/reverse-traversal) + +* **עצים** + * `B` [חיפוש לעומק](src/algorithms/tree/depth-first-search) (DFS) + * `B` [חיפוש לרוחב](src/algorithms/tree/breadth-first-search) (BFS) + +* **גרפים** + * `B` [חיפוש לעומק](src/algorithms/graph/depth-first-search) (DFS) + * `B` [חיפוש לרוחב](src/algorithms/graph/breadth-first-search) (BFS) + * `B` [אלגוריתם קרוסקל](src/algorithms/graph/kruskal) - מציאת עץ פורש מינימלי (MST) עבור גרף לא מכוון משוקלל + * `A` [אלגוריתם דייקסטרה](src/algorithms/graph/dijkstra) - מציאת המסלולים הקצרים ביותר לכל קודקודי הגרף מקודקוד יחיד + * `A` [אלגוריתם בלמן-פורד](src/algorithms/graph/bellman-ford) - מציאת המסלולים הקצרים ביותר לכל קודקודי הגרף מקודקוד יחיד + * `A` [אלגוריתם פלויד-וורשל](src/algorithms/graph/floyd-warshall) - מציאת המסלולים הקצרים ביותר בין כל זוגות הקודקודים + * `A` [זיהוי מעגל](src/algorithms/graph/detect-cycle) - עבור גרפים מכוונים ולא מכוונים (גרסאות מבוססות DFS וקבוצה מופרדת) + * `A` [אלגוריתם פרים](src/algorithms/graph/prim) - מציאת עץ פורש מינימלי (MST) עבור גרף לא מכוון משוקלל + * `A` [מיון טופולוגי](src/algorithms/graph/topological-sorting) - שיטת DFS + * `A` [נקודות חיתוך](src/algorithms/graph/articulation-points) - אלגוריתם טרג'ן (מבוסס DFS) + * `A` [גשרים](src/algorithms/graph/bridges) - אלגוריתם מבוסס DFS + * `A` [מסלול ומעגל אוילר](src/algorithms/graph/eulerian-path) - אלגוריתם פלרי - ביקור בכל קשת בדיוק פעם אחת + * `A` [מעגל המילטון](src/algorithms/graph/hamiltonian-cycle) - ביקור בכל קודקוד בדיוק פעם אחת + * `A` [רכיבים קשירים חזק](src/algorithms/graph/strongly-connected-components) - אלגוריתם קוסרג'ו + * `A` [בעיית הסוכן הנוסע](src/algorithms/graph/travelling-salesman) - המסלול הקצר ביותר האפשרי שמבקר בכל עיר וחוזר לעיר המוצא + +* **הצפנה** + * `B` [גיבוב פולינומי](src/algorithms/cryptography/polynomial-hash) - פונקציית גיבוב מתגלגלת המבוססת על פולינום + * `B` [צופן גדר מסילה](src/algorithms/cryptography/rail-fence-cipher) - אלגוריתם הצפנת טרנספוזיציה להצפנת הודעות + * `B` [צופן קיסר](src/algorithms/cryptography/caesar-cipher) - צופן החלפה פשוט + * `B` [צופן היל](src/algorithms/cryptography/hill-cipher) - צופן החלפה המבוסס על אלגברה לינארית + +* **למידת מכונה** + * `B` [NanoNeuron](https://github.com/trekhleb/nano-neuron) - 7 פונקציות JS פשוטות שמדגימות כיצד מכונות יכולות ללמוד באמת (תפוצה קדימה/אחורה) + * `B` [k-NN](src/algorithms/ml/knn) - אלגוריתם סיווג k-השכנים הקרובים ביותר + * `B` [k-Means](src/algorithms/ml/k-means) - אלגוריתם אשכול k-Means + +* **עיבוד תמונה** + * `B` [Seam Carving](src/algorithms/image-processing/seam-carving) - אלגוריתם שינוי גודל תמונה מודע תוכן + +* **סטטיסטיקה** + * `B` [משקל אקראי](src/algorithms/statistics/weighted-random) - בחירת פריט אקראי מהרשימה על בסיס משקלי הפריטים + +* **אלגוריתמים אבולוציוניים** + * `A` [אלגוריתם גנטי](https://github.com/trekhleb/self-parking-car-evolution) - דוגמה לאופן שבו ניתן ליישם אלגוריתם גנטי לאימון מכוניות בחניה עצמית + +* **לא מסווג** + * `B` [מגדלי האנוי](src/algorithms/uncategorized/hanoi-tower) + * `B` [סיבוב מטריצה ריבועית](src/algorithms/uncategorized/square-matrix-rotation) - אלגוריתם במקום + * `B` [משחק הקפיצות](src/algorithms/uncategorized/jump-game) - דוגמאות למעקב לאחור, תכנות דינמי (מלמעלה למטה + מלמטה למעלה) וחמדני + * `B` [מסלולים ייחודיים](src/algorithms/uncategorized/unique-paths) - דוגמאות למעקב לאחור, תכנות דינמי ומבוססות על משולש פסקל + * `B` [מדרגות גשם](src/algorithms/uncategorized/rain-terraces) - בעיית לכידת מי גשם (גרסאות תכנות דינמי וכוח ברוטלי) + * `B` [מדרגות רקורסיביות](src/algorithms/uncategorized/recursive-staircase) - ספירת מספר הדרכים להגיע לראש (4 פתרונות) + * `B` [הזמן הטוב ביותר לקנות ולמכור מניות](src/algorithms/uncategorized/best-time-to-buy-sell-stocks) - דוגמאות לחלוקה וכיבוש ומעבר אחד + * `A` [בעיית N-המלכות](src/algorithms/uncategorized/n-queens) + * `A` [סיור הפרש](src/algorithms/uncategorized/knight-tour) + +### אלגוריתמים לפי פרדיגמה + +פרדיגמה אלגוריתמית היא שיטה או גישה כללית המונחת בבסיס התכנון של מחלקת אלגוריתמים. זוהי הפשטה גבוהה יותר מהמושג של אלגוריתם, בדיוק כפי שאלגוריתם הוא הפשטה גבוהה יותר מתוכנית מחשב. + +* **כוח ברוטלי** - בודק את כל האפשרויות ובוחר את הפתרון הטוב ביותר + * `B` [חיפוש לינארי](src/algorithms/search/linear-search) + * `B` [מדרגות גשם](src/algorithms/uncategorized/rain-terraces) - בעיית לכידת מי גשם + * `B` [מדרגות רקורסיביות](src/algorithms/uncategorized/recursive-staircase) - ספירת מספר הדרכים להגיע לראש + * `A` [תת-מערך מקסימלי](src/algorithms/sets/maximum-subarray) + * `A` [בעיית הסוכן הנוסע](src/algorithms/graph/travelling-salesman) - המסלול הקצר ביותר האפשרי שמבקר בכל עיר וחוזר לעיר המוצא + * `A` [התמרת פורייה הבדידה](src/algorithms/math/fourier-transform) - פירוק פונקציה של זמן (אות) לתדרים המרכיבים אותה + +* **חמדני** - בוחר את האפשרות הטובה ביותר בזמן הנוכחי, ללא כל התחשבות בעתיד + * `B` [משחק הקפיצות](src/algorithms/uncategorized/jump-game) + * `A` [בעיית התרמיל הלא מוגבל](src/algorithms/sets/knapsack-problem) + * `A` [אלגוריתם דייקסטרה](src/algorithms/graph/dijkstra) - מציאת המסלולים הקצרים ביותר לכל קודקודי הגרף + * `A` [אלגוריתם פרים](src/algorithms/graph/prim) - מציאת עץ פורש מינימלי (MST) עבור גרף לא מכוון משוקלל + * `A` [אלגוריתם קרוסקל](src/algorithms/graph/kruskal) - מציאת עץ פורש מינימלי (MST) עבור גרף לא מכוון משוקלל + +* **חלוקה וכיבוש** - מחלק את הבעיה לחלקים קטנים יותר ואז פותר חלקים אלה + * `B` [חיפוש בינארי](src/algorithms/search/binary-search) + * `B` [מגדלי האנוי](src/algorithms/uncategorized/hanoi-tower) + * `B` [משולש פסקל](src/algorithms/math/pascal-triangle) + * `B` [אלגוריתם אוקלידס](src/algorithms/math/euclidean-algorithm) - חישוב המחלק המשותף הגדול ביותר (GCD) + * `B` [מיון מיזוג](src/algorithms/sorting/merge-sort) + * `B` [מיון מהיר](src/algorithms/sorting/quick-sort) + * `B` [חיפוש לעומק בעץ](src/algorithms/tree/depth-first-search) (DFS) + * `B` [חיפוש לעומק בגרף](src/algorithms/graph/depth-first-search) (DFS) + * `B` [מטריצות](src/algorithms/math/matrix) - יצירה ומעבר על מטריצות בצורות שונות + * `B` [משחק הקפיצות](src/algorithms/uncategorized/jump-game) + * `B` [חזקה מהירה](src/algorithms/math/fast-powering) + * `B` [הזמן הטוב ביותר לקנות ולמכור מניות](src/algorithms/uncategorized/best-time-to-buy-sell-stocks) - דוגמאות לחלוקה וכיבוש ומעבר אחד + * `A` [תמורות](src/algorithms/sets/permutations) (עם ובלי חזרות) + * `A` [צירופים](src/algorithms/sets/combinations) (עם ובלי חזרות) + * `A` [תת-מערך מקסימלי](src/algorithms/sets/maximum-subarray) + +* **תכנות דינמי** - בניית פתרון באמצעות תת-פתרונות שנמצאו קודם לכן + * `B` [מספר פיבונאצ'י](src/algorithms/math/fibonacci) + * `B` [משחק הקפיצות](src/algorithms/uncategorized/jump-game) + * `B` [מסלולים ייחודיים](src/algorithms/uncategorized/unique-paths) + * `B` [מדרגות גשם](src/algorithms/uncategorized/rain-terraces) - בעיית לכידת מי גשם + * `B` [מדרגות רקורסיביות](src/algorithms/uncategorized/recursive-staircase) - ספירת מספר הדרכים להגיע לראש + * `B` [Seam Carving](src/algorithms/image-processing/seam-carving) - אלגוריתם שינוי גודל תמונה מודע תוכן + * `A` [מרחק לוונשטיין](src/algorithms/string/levenshtein-distance) - מרחק העריכה המינימלי בין שתי רצפים + * `A` [תת-רצף משותף ארוך ביותר](src/algorithms/sets/longest-common-subsequence) (LCS) + * `A` [תת-מחרוזת משותפת ארוכה ביותר](src/algorithms/string/longest-common-substring) + * `A` [תת-רצף עולה ארוך ביותר](src/algorithms/sets/longest-increasing-subsequence) + * `A` [על-רצף משותף קצר ביותר](src/algorithms/sets/shortest-common-supersequence) + * `A` [בעיית התרמיל 0/1](src/algorithms/sets/knapsack-problem) + * `A` [חלוקת מספר שלם](src/algorithms/math/integer-partition) + * `A` [תת-מערך מקסימלי](src/algorithms/sets/maximum-subarray) + * `A` [אלגוריתם בלמן-פורד](src/algorithms/graph/bellman-ford) - מציאת המסלולים הקצרים ביותר לכל קודקודי הגרף + * `A` [אלגוריתם פלויד-וורשל](src/algorithms/graph/floyd-warshall) - מציאת המסלולים הקצרים ביותר בין כל זוגות הקודקודים + * `A` [התאמת ביטוי רגולרי](src/algorithms/string/regular-expression-matching) + +* **מעקב לאחור** - בדומה לכוח ברוטלי, מנסה לייצר את כל הפתרונות האפשריים, אך בכל פעם שאתה מייצר פתרון הבא אתה בודק אם הוא עומד בכל התנאים, ורק אז ממשיך לייצר פתרונות הבאים. אחרת, חוזר אחורה, והולך בנתיב אחר של מציאת פתרון. בדרך כלל מעבר DFS של מרחב המצבים משמש. + * `B` [משחק הקפיצות](src/algorithms/uncategorized/jump-game) + * `B` [מסלולים ייחודיים](src/algorithms/uncategorized/unique-paths) + * `B` [קבוצת חזקה](src/algorithms/sets/power-set) - כל תתי הקבוצות של קבוצה + * `A` [מעגל המילטון](src/algorithms/graph/hamiltonian-cycle) - ביקור בכל קודקוד בדיוק פעם אחת + * `A` [בעיית N-המלכות](src/algorithms/uncategorized/n-queens) + * `A` [סיור הפרש](src/algorithms/uncategorized/knight-tour) + * `A` [סכום צירוף](src/algorithms/sets/combination-sum) - מציאת כל הצירופים שיוצרים סכום ספציפי + +* **סניף וחסום** - זוכר את הפתרון בעלות הנמוכה ביותר שנמצא בכל שלב של החיפוש המעקב לאחור, ומשתמש בעלות של הפתרון בעלות הנמוכה ביותר שנמצא עד כה כגבול תחתון על העלות של פתרון בעלות מינימלית לבעיה, על מנת לפסול פתרונות חלקיים עם עלויות גדולות יותר מהפתרון בעלות הנמוכה ביותר שנמצא עד כה. בדרך כלל מעבר BFS בשילוב עם מעבר DFS של עץ מרחב המצבים משמש. + +## כיצד להשתמש במאגר זה + +**התקנת כל התלויות** + +``` +npm install +``` + +**הרצת ESLint** + +ייתכן שתרצה להריץ אותו כדי לבדוק את איכות הקוד. + +``` +npm run lint +``` + +**הרצת כל הבדיקות** + +``` +npm test +``` + +**הרצת בדיקות לפי שם** + +``` +npm test -- 'LinkedList' +``` + +**פתרון בעיות** + +אם הלינטינג או הבדיקות נכשלים, נסה למחוק את התיקייה `node_modules` ולהתקין מחדש את חבילות npm: + +``` +rm -rf ./node_modules +npm i +``` + +בנוסף, ודא שאתה משתמש בגרסת Node נכונה (`>=16`). אם אתה משתמש ב-[nvm](https://github.com/nvm-sh/nvm) לניהול גרסאות Node, תוכל להריץ `nvm use` מתיקיית השורש של הפרויקט והגרסה הנכונה תיבחר. + +**שטח משחקים** + +אתה יכול לשחק עם מבני נתונים ואלגוריתמים בקובץ `./src/playground/playground.js` ולכתוב +בדיקות עבורו ב-`./src/playground/__test__/playground.test.js`. + +לאחר מכן פשוט הרץ את הפקודה הבאה כדי לבדוק אם קוד שטח המשחקים שלך עובד כמצופה: + +``` +npm test -- 'playground' +``` + +## מידע שימושי + +### הפניות + +- [▶ מבני נתונים ואלגוריתמים ב-YouTube](https://www.youtube.com/playlist?list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8) +- [✍🏻 סקיצות של מבני נתונים](https://okso.app/showcase/data-structures) + +### סימון ה-O הגדול + +סימון *ה-O הגדול* משמש לסיווג אלגוריתמים לפי כיצד זמן הריצה או דרישות המרחב שלהם גדלים ככל שגודל הקלט גדל. +בתרשים שלהלן תוכל למצוא את הסדרים הנפוצים ביותר של צמיחת אלגוריתמים המצוינים בסימון ה-O הגדול. + + + +מקור: [Big O Cheat Sheet](http://bigocheatsheet.com/). + +להלן רשימה של כמה מסימוני ה-O הגדול הנפוצים ביותר והשוואות הביצועים שלהם מול גדלים שונים של נתוני קלט. + +| סימון ה-O הגדול | חישובים ל-10 אלמנטים | חישובים ל-100 אלמנטים | חישובים ל-1000 אלמנטים | +| ---------------- | --------------------- | ---------------------- | ----------------------- | +| **O(1)** | 1 | 1 | 1 | +| **O(log N)** | 3 | 6 | 9 | +| **O(N)** | 10 | 100 | 1000 | +| **O(N log N)** | 30 | 600 | 9000 | +| **O(N^2)** | 100 | 10000 | 1000000 | +| **O(2^N)** | 1024 | 1.26e+29 | 1.07e+301 | +| **O(N!)** | 3628800 | 9.3e+157 | 4.02e+2567 | + +### מורכבות פעולות מבני נתונים + +| מבנה נתונים | גישה | חיפוש | הכנסה | מחיקה | הערות | +| --------------------- | :-----: | :-----: | :-----: | :-----: | :------ | +| **מערך** | 1 | n | n | n | | +| **מחסנית** | n | n | 1 | 1 | | +| **תור** | n | n | 1 | 1 | | +| **רשימה מקושרת** | n | n | 1 | n | | +| **טבלת גיבוב** | - | n | n | n | במקרה של פונקציית גיבוב מושלמת, העלויות יהיו O(1) | +| **עץ חיפוש בינארי** | n | n | n | n | במקרה של עץ מאוזן, העלויות יהיו O(log(n)) | +| **עץ B** | log(n) | log(n) | log(n) | log(n) | | +| **עץ אדום-שחור** | log(n) | log(n) | log(n) | log(n) | | +| **עץ AVL** | log(n) | log(n) | log(n) | log(n) | | +| **מסנן בלום** | - | 1 | 1 | - | תוצאות חיוביות שגויות אפשריות בעת חיפוש | + +### מורכבות אלגוריתמי מיון מערכים + +| שם | הטוב ביותר | ממוצע | הגרוע ביותר | זיכרון | יציב | הערות | +| ------------------- | :----------------: | :-----------------: | :------------------: | :-----: | :-----: | :------ | +| **מיון בועות** | n | n<sup>2</sup> | n<sup>2</sup> | 1 | כן | | +| **מיון הכנסה** | n | n<sup>2</sup> | n<sup>2</sup> | 1 | כן | | +| **מיון בחירה** | n<sup>2</sup> | n<sup>2</sup> | n<sup>2</sup> | 1 | לא | | +| **מיון ערימה** | n log(n) | n log(n) | n log(n) | 1 | לא | | +| **מיון מיזוג** | n log(n) | n log(n) | n log(n) | n | כן | | +| **מיון מהיר** | n log(n) | n log(n) | n<sup>2</sup> | log(n) | לא | מיון מהיר בדרך כלל מבוצע במקום עם O(log(n)) שטח מחסנית | +| **מיון צדפות** | n log(n) | תלוי ברצף הפער | n (log(n))<sup>2</sup> | 1 | לא | | +| **מיון ספירה** | n + r | n + r | n + r | n + r | כן | r - המספר הגדול ביותר במערך | +| **מיון בסיס** | n * k | n * k | n * k | n + k | כן | k - אורך המפתח הארוך ביותר | + +## תומכי הפרויקט + +> אתה יכול לתמוך בפרויקט זה דרך ❤️️ [GitHub](https://github.com/sponsors/trekhleb) או ❤️️ [Patreon](https://www.patreon.com/trekhleb). + +[אנשים שתומכים בפרויקט זה](https://github.com/trekhleb/javascript-algorithms/blob/master/BACKERS.md) `∑ = 1` + +## מחבר + +[@trekhleb](https://trekhleb.dev) + +כמה [פרויקטים](https://trekhleb.dev/projects/) ו[מאמרים](https://trekhleb.dev/blog/) נוספים על JavaScript ואלגוריתמים ב-[trekhleb.dev](https://trekhleb.dev)* `B` [משחק הקפיצות](src/algorithms/uncategor * `B` [חיפוש בינארי](src/algorithms diff --git a/README.id-ID.md b/README.id-ID.md index 2f4310fee3..527abb45f2 100644 --- a/README.id-ID.md +++ b/README.id-ID.md @@ -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-HE.md) _☝ Perhatikan bahwa proyek ini hanya dimaksudkan untuk tujuan pembelajaran dan riset, dan **tidak** dimaksudkan untuk digunakan sebagai produksi._ diff --git a/README.it-IT.md b/README.it-IT.md index a86c52cfbb..63007d80d9 100644 --- a/README.it-IT.md +++ b/README.it-IT.md @@ -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-HE.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.* diff --git a/README.ja-JP.md b/README.ja-JP.md index 6e3a8b8192..fc584780c2 100644 --- a/README.ja-JP.md +++ b/README.ja-JP.md @@ -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-HE.md) ## データ構造 diff --git a/README.ko-KR.md b/README.ko-KR.md index 9aac387e8d..20b6080eda 100644 --- a/README.ko-KR.md +++ b/README.ko-KR.md @@ -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-HE.md) ## 자료 구조 diff --git a/README.md b/README.md index ace86b9c0b..3201136c03 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,8 @@ _Read this in other languages:_ [_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-HE.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.* diff --git a/README.pl-PL.md b/README.pl-PL.md index 9fac028aa3..f95cfaeb99 100644 --- a/README.pl-PL.md +++ b/README.pl-PL.md @@ -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-HE.md) ## Struktury Danych diff --git a/README.pt-BR.md b/README.pt-BR.md index edb2bd4417..b451e5da5e 100644 --- a/README.pt-BR.md +++ b/README.pt-BR.md @@ -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-HE.md) ## Estrutura de Dados diff --git a/README.ru-RU.md b/README.ru-RU.md index b926b5eab3..a14171f260 100644 --- a/README.ru-RU.md +++ b/README.ru-RU.md @@ -25,6 +25,7 @@ _Читать на других языках:_ [_Tiếng Việt_](README.vi-VN.md), [_Deutsch_](README.de-DE.md), [_Uzbek_](README.uz-UZ.md) +[_עברית_](README.he-HE.md) *☝ Замечание: этот репозиторий предназначен для учебно-исследовательских целей (**не** для использования в продакшн-системах).* diff --git a/README.tr-TR.md b/README.tr-TR.md index fada4e0b48..2075132bda 100644 --- a/README.tr-TR.md +++ b/README.tr-TR.md @@ -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-HE.md) *☝ Not, bu proje araştırma ve öğrenme amacı ile yapılmış olup üretim için **yapılmamıştır**.* diff --git a/README.uk-UA.md b/README.uk-UA.md index e79a8ae845..c636d21b09 100644 --- a/README.uk-UA.md +++ b/README.uk-UA.md @@ -25,6 +25,7 @@ _Вивчення матеріалу на інших мовах:_ [_Tiếng Việt_](README.vi-VN.md), [_Deutsch_](README.de-DE.md), [_Uzbek_](README.uz-UZ.md) +[_עברית_](README.he-HE.md) *☝ Зверніть увагу! Даний проект призначений лише для навчальних та дослідницьких цілей, і він **не** призначений для виробництва (продакшн).* diff --git a/README.uz-UZ.md b/README.uz-UZ.md index 130c1f99d3..32a8b509bd 100644 --- a/README.uz-UZ.md +++ b/README.uz-UZ.md @@ -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-HE.md) Yodda tuting, bu loyiha faqat o'quv va tadqiqot maqsadida ishlatilishi uchun mo'ljallangan va ishlab chiqarishda ishlatilishi **mumkin emas**. diff --git a/README.vi-VN.md b/README.vi-VN.md index a5cbb72e07..6fd4deaaa4 100644 --- a/README.vi-VN.md +++ b/README.vi-VN.md @@ -25,6 +25,7 @@ _Đọc bằng ngôn ngữ khác:_ [_Bahasa Indonesia_](README.id-ID.md), [_Українська_](README.uk-UA.md), [_Arabic_](README.ar-AR.md) +[_עברית_](README.he-HE.md) *☝ Dự án này chỉ được sử dụng cho mục đích học tập và nghiên cứu, **không** được dùng cho mục đích thương mại.* @@ -97,19 +98,19 @@ quy tắc xác định chính xác một chuỗi phép toán. * `A` [Dãy con chung ngắn nhất](src/algorithms/sets/shortest-common-supersequence) (SCS) * `A` [Bài toán xếp ba lô](src/algorithms/sets/knapsack-problem) - dạng 0-1 và không bị chặn * `A` [Mảng con lớn nhất](src/algorithms/sets/maximum-subarray) - phiên bản vét cạn và quy hoạch động (Kadane) - * `A` [Tổ hợp của tổng](src/algorithms/sets/combination-sum) - tìm tất cả các tổ hợp tạo thành tổng cụ thể + * `A` [Tổ hợp của tổng](src/algorithms/sets/combination-sum) - tìm tất cả các tổ hợp tạo thành tổng cụ thể * **Chuỗi** - * `B` [Khoảng cách Hamming](src/algorithms/string/hamming-distance) - số các vị trí các ký hiệu khác nhau + * `B` [Khoảng cách Hamming](src/algorithms/string/hamming-distance) - số các vị trí các ký hiệu khác nhau * `A` [Khoảng cách Levenshtein](src/algorithms/string/levenshtein-distance) - khoảng cách thay đổi nhỏ nhất giữa hai chuỗi ký tự - * `A` [Thuật toán Knuth–Morris–Pratt](src/algorithms/string/knuth-morris-pratt) (thuật toán KMP) - tìm chuỗi con (đối sánh mẫu) + * `A` [Thuật toán Knuth–Morris–Pratt](src/algorithms/string/knuth-morris-pratt) (thuật toán KMP) - tìm chuỗi con (đối sánh mẫu) * `A` [Thuật toán Z](src/algorithms/string/z-algorithm) - tìm chuỗi con (đối sánh mẫu) * `A` [Thuật toán Rabin Karp](src/algorithms/string/rabin-karp) - tìm chuỗi con * `A` [Xâu con chung dài nhất](src/algorithms/string/longest-common-substring) * `A` [Phối biểu thức chính quy](src/algorithms/string/regular-expression-matching) * **Tìm kiếm** * `B` [Tìm kiếm tuyến tính](src/algorithms/search/linear-search) - * `B` [Tìm kiếm nhảy](src/algorithms/search/jump-search) (tìm khối) - tìm kiếm trong mảng đã sắp xếp - * `B` [Tìm kiếm nhị phân](src/algorithms/search/binary-search) - tìm kiếm trong mảng đã sắp xếp + * `B` [Tìm kiếm nhảy](src/algorithms/search/jump-search) (tìm khối) - tìm kiếm trong mảng đã sắp xếp + * `B` [Tìm kiếm nhị phân](src/algorithms/search/binary-search) - tìm kiếm trong mảng đã sắp xếp * `B` [Tìm kiếm nội suy ](src/algorithms/search/interpolation-search) - Tìm kiếm strong mảng có thứ tự được phân phối đồng nhất * **Sắp xếp** * `B` [Sắp xếp nổi bọt](src/algorithms/sorting/bubble-sort) @@ -144,12 +145,12 @@ quy tắc xác định chính xác một chuỗi phép toán. * `A` [Các thành phần kết nối chặt](src/algorithms/graph/strongly-connected-components) - Thuật toán Kosaraju * `A` [Bài toán người bán hàng](src/algorithms/graph/travelling-salesman) - tuyến đường ngắn nhất có thể đến thăm từng thành phố và trở về thành phố gốc * **Mật mã học** - * `B` [Băm đa thức](src/algorithms/cryptography/polynomial-hash) - lăn hàm băm dựa trên đa thức - * `B` [Mật mã hàng rào đường sắt](src/algorithms/cryptography/rail-fence-cipher) - một thuật toán mật mã chuyển vị để mã hóa thông điệp + * `B` [Băm đa thức](src/algorithms/cryptography/polynomial-hash) - lăn hàm băm dựa trên đa thức + * `B` [Mật mã hàng rào đường sắt](src/algorithms/cryptography/rail-fence-cipher) - một thuật toán mật mã chuyển vị để mã hóa thông điệp * `B` [Mật mã Caesar](src/algorithms/cryptography/caesar-cipher) - mật mã chuyển vị đơn giản * `B` [Mật mã Hill](src/algorithms/cryptography/hill-cipher) - mật mã chuyển vị đơn giản dựa trên đại số tuyến tính * **Học máy** - * `B` [NanoNeuron](https://github.com/trekhleb/nano-neuron) - 7 hàm JS đơn giản minh họa cách máy tính thực sự có thể học (truyền thuận / truyền ngược) + * `B` [NanoNeuron](https://github.com/trekhleb/nano-neuron) - 7 hàm JS đơn giản minh họa cách máy tính thực sự có thể học (truyền thuận / truyền ngược) * `B` [k-NN](src/algorithms/ml/knn) - thuật toán phân loại k láng giềng gần nhất * `B` [k-Means](src/algorithms/ml/k-means) - thuật toán phân cụm k-Means * **Khác** @@ -167,22 +168,22 @@ quy tắc xác định chính xác một chuỗi phép toán. Mẫu hình thuật toán là một phương pháp hoặc cách tiếp cận chung làm cơ sở cho việc thiết kế một lớp thuật toán. Nó là một sự trừu tượng cao hơn khái niệm về một thuật toán, cũng giống như -một thuật toán là một sự trừu tượng cao hơn một chương trình máy tính. +một thuật toán là một sự trừu tượng cao hơn một chương trình máy tính. -* **Vét cạn** - xem xét tất cả các khả năng và chọn giải pháp tốt nhất +* **Vét cạn** - xem xét tất cả các khả năng và chọn giải pháp tốt nhất * `B` [Tìm kiếm tuyến tính](src/algorithms/search/linear-search) * `B` [Thu thập nước mưa](src/algorithms/uncategorized/rain-terraces) - bài toán bẫy nước mưa * `B` [Cầu thang đệ quy](src/algorithms/uncategorized/recursive-staircase) - đếm số cách lên đến đỉnh * `A` [Mảng con lớn nhất](src/algorithms/sets/maximum-subarray) * `A` [Bài toán người bán hàng](src/algorithms/graph/travelling-salesman) - tuyến đường ngắn nhất có thể đến thăm từng thành phố và trở về thành phố gốc * `A` [Biến đổi Fourier rời rạc](src/algorithms/math/fourier-transform) - phân giải tín hiệu thời gian thành các tần số tạo nên tín hiệu đó -* **Tham lam** - chọn phương án tốt nhất vào thời điểm hiện tại mà không cần cân nhắc đến tương lai +* **Tham lam** - chọn phương án tốt nhất vào thời điểm hiện tại mà không cần cân nhắc đến tương lai * `B` [Trò chơi nhảy](src/algorithms/uncategorized/jump-game) * `A` [Bài xếp ba lô không bị chặn](src/algorithms/sets/knapsack-problem) * `A` [Thuật toán Dijkstra](src/algorithms/graph/dijkstra) - tìm những đường ngắn nhất từ một định tới tất cả các đỉnh * `A` [Thuật toán Prim](src/algorithms/graph/prim) - tìm cây bao trùm nhỏ nhất (MST) cho đồ thị vô hướng có trọng số * `A` [Thuật toán Kruskal](src/algorithms/graph/kruskal) - tìm cây bao trùm nhỏ nhất (MST) cho đồ thị vô hướng có trọng số -* **Chia để trị** - chia vấn đề thành các phần nhỏ hơn rồi giải quyết các phần đó +* **Chia để trị** - chia vấn đề thành các phần nhỏ hơn rồi giải quyết các phần đó * `B` [Tìm kiếm nhị phân](src/algorithms/search/binary-search) * `B` [Tháp Hà Nội](src/algorithms/uncategorized/hanoi-tower) * `B` [Tam giác Pascal](src/algorithms/math/pascal-triangle) @@ -191,7 +192,7 @@ một thuật toán là một sự trừu tượng cao hơn một chương trìn * `B` [Sắp xếp nhanh](src/algorithms/sorting/quick-sort) * `B` [Cây tìm kiếm theo chiều sâu](src/algorithms/tree/depth-first-search) (DFS) * `B` [Đồ thị tìm kiếm theo chiều sâu](src/algorithms/graph/depth-first-search) (DFS) - * `B` [Ma trận](src/algorithms/math/matrix) - tạo và duyệt các ma trận có kích thước khác nhau + * `B` [Ma trận](src/algorithms/math/matrix) - tạo và duyệt các ma trận có kích thước khác nhau * `B` [Trò chơi nhảy](src/algorithms/uncategorized/jump-game) * `B` [Tính nhanh lũy thừa](src/algorithms/math/fast-powering) * `B` [Thời điểm tốt nhất để mua bán cổ phiếu](src/algorithms/uncategorized/best-time-to-buy-sell-stocks) - ví dụ chia để trị và một đường chuyền @@ -216,18 +217,18 @@ một thuật toán là một sự trừu tượng cao hơn một chương trìn * `A` [Phối biểu thức chính quy](src/algorithms/string/regular-expression-matching) * **Quay lui** - tương tự như vét cạn, cố tạo ra tất cả các giải pháp có thể, nhưng mỗi lần bạn tạo ra giải pháp tiếp theo, bạn sẽ kiểm tra xem nó có thỏa mãn tất cả các điều kiện hay không và chỉ khi thỏa mãn mới tiếp tục tạo ra các giải pháp tiếp theo. -Nếu không, hãy quay lại và đi trên một con đường khác để tìm ra giải pháp. Thông thường, truyền DFS của không gian trạng thái được sử dụng. +Nếu không, hãy quay lại và đi trên một con đường khác để tìm ra giải pháp. Thông thường, truyền DFS của không gian trạng thái được sử dụng. * `B` [Trò chơi nhảy](src/algorithms/uncategorized/jump-game) * `B` [Đường đi độc nhất](src/algorithms/uncategorized/unique-paths) * `B` [Tập lũy thừa](src/algorithms/sets/power-set) - tập hợp chứa tất cả các tập con * `A` [Chu trình Hamilton](src/algorithms/graph/hamiltonian-cycle) - đi qua các đỉnh một lần duy nhất * `A` [Bài toán n quân hậu](src/algorithms/uncategorized/n-queens) * `A` [Mã đi tuần](src/algorithms/uncategorized/knight-tour) - * `A` [Tổ hợp của tổng](src/algorithms/sets/combination-sum) - tìm tất cả các tổ hợp tạo thành tổng cụ thể + * `A` [Tổ hợp của tổng](src/algorithms/sets/combination-sum) - tìm tất cả các tổ hợp tạo thành tổng cụ thể * **Branch & Bound** - ghi nhớ giải pháp chi với phí thấp nhất được tìm thấy ở mỗi giai đoạn của quá trình tìm kiếm quay lui, sử dụng chi phí của giải pháp có chi phí thấp nhất được tìm thấy cho đến nay như một giới hạn dưới về chi phí của -một giải pháp ít chi phí nhân cho bài toán, để loại bỏ các giải pháp từng phần với chi phí lớn hơn giải pháp chi phí thấp nhất được tìm thấy cho đến nay. -Thông thường BFS duyệt kết hợp với duyệt DFS của cây không gian trạng thái đang được sử dụng. +một giải pháp ít chi phí nhân cho bài toán, để loại bỏ các giải pháp từng phần với chi phí lớn hơn giải pháp chi phí thấp nhất được tìm thấy cho đến nay. +Thông thường BFS duyệt kết hợp với duyệt DFS của cây không gian trạng thái đang được sử dụng. ## Hướng dẫn sử dụng repository @@ -238,7 +239,7 @@ npm install **Chạy ESLint** -Bạn có thể muốn chạy nó để kiểm tra chất lượng code. +Bạn có thể muốn chạy nó để kiểm tra chất lượng code. ``` npm run lint @@ -259,7 +260,7 @@ npm test -- 'LinkedList' Bạn có thể chơi với các cấu trúc dữ liệu và thuật toán trong tệp `./src/playground/playground.js` và viết các bài kiểm thử cho nó ở `./src/playground/__test__/playground.test.js`. -Sau đó, chỉ cần chạy lệnh sau để kiểm tra xem sân chơi của bạn có hoạt động như mong đợi hay không: +Sau đó, chỉ cần chạy lệnh sau để kiểm tra xem sân chơi của bạn có hoạt động như mong đợi hay không: ``` npm test -- 'playground' @@ -274,7 +275,7 @@ npm test -- 'playground' ### Kí hiệu O lớn *Kí hiệu O lớn* được dùng để phân loại thuật toán theo thời gian chạy hoặc yêu cầu không gian gia tăng khi kích thước đầu vào gia tăng. -Trên biểu đồ bên dưới, bạn có thể tìm thấy hầu hết các thứ tự tăng trưởng phổ biến của các thuật toán được chỉ định trong ký hiệu O lớn. +Trên biểu đồ bên dưới, bạn có thể tìm thấy hầu hết các thứ tự tăng trưởng phổ biến của các thuật toán được chỉ định trong ký hiệu O lớn.  diff --git a/README.zh-CN.md b/README.zh-CN.md index 27982c6553..59b3488142 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -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-HE.md) *注意:这个项目仅用于学习和研究,**不是**用于生产环境。* diff --git a/README.zh-TW.md b/README.zh-TW.md index aeb0547d2e..2bfd9134b7 100644 --- a/README.zh-TW.md +++ b/README.zh-TW.md @@ -24,6 +24,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-HE.md) ## 資料結構 From c5dd0483bfd873e5f53c6d08f12f0b129caef339 Mon Sep 17 00:00:00 2001 From: trekhleb <3000285+trekhleb@users.noreply.github.com> Date: Wed, 12 Feb 2025 17:17:52 +0100 Subject: [PATCH 4/5] Fix language code --- README.ar-AR.md | 2 +- README.de-DE.md | 2 +- README.es-ES.md | 2 +- README.fr-FR.md | 2 +- README.he-HE.md => README.he-IL.md | 0 README.id-ID.md | 2 +- README.it-IT.md | 2 +- README.ja-JP.md | 2 +- README.ko-KR.md | 2 +- README.md | 2 +- README.pl-PL.md | 2 +- README.pt-BR.md | 2 +- README.ru-RU.md | 2 +- README.tr-TR.md | 2 +- README.uk-UA.md | 2 +- README.uz-UZ.md | 2 +- README.vi-VN.md | 2 +- README.zh-CN.md | 2 +- README.zh-TW.md | 2 +- 19 files changed, 18 insertions(+), 18 deletions(-) rename README.he-HE.md => README.he-IL.md (100%) diff --git a/README.ar-AR.md b/README.ar-AR.md index 39997e24a5..2ff0baddbd 100644 --- a/README.ar-AR.md +++ b/README.ar-AR.md @@ -25,7 +25,7 @@ _اقرأ هذا في لغات أخرى:_ [_Tiếng Việt_](README.vi-VN.md), [_Deutsch_](README.de-DE.md), [_Uzbek_](README.uz-UZ.md) -[_עברית_](README.he-HE.md) +[_עברית_](README.he-IL.md) ☝ ملاحضة هذا المشروع مخصص للاستخدام لأغراض التعلم والبحث فقط ، و ** ليست ** معدة للاستخدام في **الإنتاج** diff --git a/README.de-DE.md b/README.de-DE.md index e8f1b4b22b..019e7d6b39 100644 --- a/README.de-DE.md +++ b/README.de-DE.md @@ -26,7 +26,7 @@ _Lies dies in anderen Sprachen:_ [_Українська_](README.uk-UA.md), [_Arabic_](README.ar-AR.md), [_Uzbek_](README.uz-UZ.md) -[_עברית_](README.he-HE.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_ diff --git a/README.es-ES.md b/README.es-ES.md index de4d6889f8..3a15ada4bd 100644 --- a/README.es-ES.md +++ b/README.es-ES.md @@ -27,7 +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-HE.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.* diff --git a/README.fr-FR.md b/README.fr-FR.md index d24d5db915..cb30d1833d 100644 --- a/README.fr-FR.md +++ b/README.fr-FR.md @@ -28,7 +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-HE.md) +[_עברית_](README.he-IL.md) ## Data Structures diff --git a/README.he-HE.md b/README.he-IL.md similarity index 100% rename from README.he-HE.md rename to README.he-IL.md diff --git a/README.id-ID.md b/README.id-ID.md index 527abb45f2..9dd908c2e6 100644 --- a/README.id-ID.md +++ b/README.id-ID.md @@ -25,7 +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-HE.md) +[_עברית_](README.he-IL.md) _☝ Perhatikan bahwa proyek ini hanya dimaksudkan untuk tujuan pembelajaran dan riset, dan **tidak** dimaksudkan untuk digunakan sebagai produksi._ diff --git a/README.it-IT.md b/README.it-IT.md index 63007d80d9..d749a6aa7f 100644 --- a/README.it-IT.md +++ b/README.it-IT.md @@ -24,7 +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-HE.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.* diff --git a/README.ja-JP.md b/README.ja-JP.md index fc584780c2..acf9dee8f0 100644 --- a/README.ja-JP.md +++ b/README.ja-JP.md @@ -27,7 +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-HE.md) +[_עברית_](README.he-IL.md) ## データ構造 diff --git a/README.ko-KR.md b/README.ko-KR.md index 20b6080eda..d4b0d4ef14 100644 --- a/README.ko-KR.md +++ b/README.ko-KR.md @@ -26,7 +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-HE.md) +[_עברית_](README.he-IL.md) ## 자료 구조 diff --git a/README.md b/README.md index 3201136c03..6a98a76fb0 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,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-HE.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.* diff --git a/README.pl-PL.md b/README.pl-PL.md index f95cfaeb99..56617030ab 100644 --- a/README.pl-PL.md +++ b/README.pl-PL.md @@ -28,7 +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-HE.md) +[_עברית_](README.he-IL.md) ## Struktury Danych diff --git a/README.pt-BR.md b/README.pt-BR.md index b451e5da5e..5b16798bc9 100644 --- a/README.pt-BR.md +++ b/README.pt-BR.md @@ -28,7 +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-HE.md) +[_עברית_](README.he-IL.md) ## Estrutura de Dados diff --git a/README.ru-RU.md b/README.ru-RU.md index a14171f260..939ed46700 100644 --- a/README.ru-RU.md +++ b/README.ru-RU.md @@ -25,7 +25,7 @@ _Читать на других языках:_ [_Tiếng Việt_](README.vi-VN.md), [_Deutsch_](README.de-DE.md), [_Uzbek_](README.uz-UZ.md) -[_עברית_](README.he-HE.md) +[_עברית_](README.he-IL.md) *☝ Замечание: этот репозиторий предназначен для учебно-исследовательских целей (**не** для использования в продакшн-системах).* diff --git a/README.tr-TR.md b/README.tr-TR.md index 2075132bda..53600480db 100644 --- a/README.tr-TR.md +++ b/README.tr-TR.md @@ -25,7 +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-HE.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**.* diff --git a/README.uk-UA.md b/README.uk-UA.md index c636d21b09..5ee5f7cbcc 100644 --- a/README.uk-UA.md +++ b/README.uk-UA.md @@ -25,7 +25,7 @@ _Вивчення матеріалу на інших мовах:_ [_Tiếng Việt_](README.vi-VN.md), [_Deutsch_](README.de-DE.md), [_Uzbek_](README.uz-UZ.md) -[_עברית_](README.he-HE.md) +[_עברית_](README.he-IL.md) *☝ Зверніть увагу! Даний проект призначений лише для навчальних та дослідницьких цілей, і він **не** призначений для виробництва (продакшн).* diff --git a/README.uz-UZ.md b/README.uz-UZ.md index 32a8b509bd..114a4de9cc 100644 --- a/README.uz-UZ.md +++ b/README.uz-UZ.md @@ -29,7 +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-HE.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**. diff --git a/README.vi-VN.md b/README.vi-VN.md index 6fd4deaaa4..4c35f467f8 100644 --- a/README.vi-VN.md +++ b/README.vi-VN.md @@ -25,7 +25,7 @@ _Đọc bằng ngôn ngữ khác:_ [_Bahasa Indonesia_](README.id-ID.md), [_Українська_](README.uk-UA.md), [_Arabic_](README.ar-AR.md) -[_עברית_](README.he-HE.md) +[_עברית_](README.he-IL.md) *☝ Dự án này chỉ được sử dụng cho mục đích học tập và nghiên cứu, **không** được dùng cho mục đích thương mại.* diff --git a/README.zh-CN.md b/README.zh-CN.md index 59b3488142..14e0f0e36c 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -25,7 +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-HE.md) +[_עברית_](README.he-IL.md) *注意:这个项目仅用于学习和研究,**不是**用于生产环境。* diff --git a/README.zh-TW.md b/README.zh-TW.md index 2bfd9134b7..aa48b40bd8 100644 --- a/README.zh-TW.md +++ b/README.zh-TW.md @@ -24,7 +24,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-HE.md) +[_עברית_](README.he-IL.md) ## 資料結構 From e40a67b5d1aaf006622a90e2bda60043f4f66679 Mon Sep 17 00:00:00 2001 From: trekhleb <3000285+trekhleb@users.noreply.github.com> Date: Wed, 12 Feb 2025 17:19:46 +0100 Subject: [PATCH 5/5] Move "valid parentheses" to the "Uncategorized" section --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 6a98a76fb0..3e5c5cc096 100644 --- a/README.md +++ b/README.md @@ -144,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) @@ -188,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)