repo_name
stringclasses
25 values
repo_full_name
stringclasses
25 values
owner
stringclasses
25 values
stars
int64
117k
496k
license
stringclasses
7 values
repo_description
stringclasses
25 values
filepath
stringlengths
9
75
file_type
stringclasses
3 values
language
stringclasses
2 values
content
stringlengths
24
383k
size_bytes
int64
25
387k
num_lines
int64
2
4.44k
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\algorithms\tree\depth-first-search\README.md
readme
Markdown
# Depth-First Search (DFS) Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. One starts at the root (selecting some arbitrary node as the root in the case of a graph) and explores as far as possible along each branch before backtracking. ![Algorithm Visualization]...
695
16
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\algorithms\uncategorized\best-time-to-buy-sell-stocks\README.md
readme
Markdown
# Best Time to Buy and Sell Stock ## Task Description Say you have an array prices for which the `i`-th element is the price of a given stock on day `i`. Find the maximum profit. You may complete as many transactions as you like (i.e., buy one and sell one share of the stock multiple times). > Note: You may not eng...
5,047
108
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\algorithms\uncategorized\hanoi-tower\README.md
readme
Markdown
# Tower of Hanoi The Tower of Hanoi (also called the Tower of Brahma or Lucas' Tower and sometimes pluralized) is a mathematical game or puzzle. It consists of three rods and a number of disks of different sizes, which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of siz...
1,297
30
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\algorithms\uncategorized\jump-game\README.md
readme
Markdown
# Jump Game ## The Problem Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if you are able to reach the last index. **Example #1** ``` Input: [2,3,1,1,4] Output: true E...
4,935
129
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\algorithms\uncategorized\knight-tour\README.md
readme
Markdown
# Knight's Tour A **knight's tour** is a sequence of moves of a knight on a chessboard such that the knight visits every square only once. If the knight ends on a square that is one knight's move from the beginning square (so that it could tour the board again immediately, following the same path), the tour is **c...
1,409
34
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\algorithms\uncategorized\n-queens\README.md
readme
Markdown
# N-Queens Problem The **eight queens puzzle** is the problem of placing eight chess queens on an `8×8` chessboard so that no two queens threaten each other. Thus, a solution requires that no two queens share the same row, column, or diagonal. The eight queens puzzle is an example of the more general *n queens pro...
5,119
118
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\algorithms\uncategorized\rain-terraces\README.md
readme
Markdown
# Rain Terraces (Trapping Rain Water) Problem Given an array of non-negative integers representing terraces in an elevation map where the width of each bar is `1`, compute how much water it is able to trap after raining. ![Rain Terraces](https://www.geeksforgeeks.org/wp-content/uploads/watertrap.png) ## Examples ...
3,751
123
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\algorithms\uncategorized\recursive-staircase\README.md
readme
Markdown
# Recursive Staircase Problem ## The Problem There are `n` stairs, a person standing at the bottom wants to reach the top. The person can climb either `1` or `2` stairs at a time. _Count the number of ways, the person can reach the top._ ![](https://cdncontribute.geeksforgeeks.org/wp-content/uploads/nth-stair.png) ...
1,091
22
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\algorithms\uncategorized\square-matrix-rotation\README.md
readme
Markdown
# Square Matrix In-Place Rotation ## The Problem You are given an `n x n` 2D matrix (representing an image). Rotate the matrix by `90` degrees (clockwise). **Note** You have to rotate the image **in-place**, which means you have to modify the input 2D matrix directly. **DO NOT** allocate another 2D matrix and do ...
1,963
111
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\algorithms\uncategorized\unique-paths\README.md
readme
Markdown
# Unique Paths Problem A robot is located at the top-left corner of a `m x n` grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked 'Finish' in the diagram below). How many possible un...
2,881
107
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\bloom-filter\README.md
readme
Markdown
# Bloom Filter _Read this in other languages:_ [_Русский_](README.ru-RU.md), [_Português_](README.pt-BR.md), [_Українська_](README.uk-UA.md) A **bloom filter** is a space-efficient probabilistic data structure designed to test whether an element is present in a set. It is designed to be blazingly fast and use minimal...
4,991
134
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\bloom-filter\README.pt-BR.md
readme
Markdown
# Filtro Bloom (Bloom Filter) O **bloom filter** é uma estrutura de dados probabilística espaço-eficiente designada para testar se um elemento está ou não presente em um conjunto de dados. Foi projetado para ser incrivelmente rápida e utilizar o mínimo de memória ao potencial custo de um falso-positivo. Correspondênc...
5,404
130
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\bloom-filter\README.ru-RU.md
readme
Markdown
# Фильтр Блума **Фильтр Блума** - это пространственно-эффективная вероятностная структура данных, созданная для проверки наличия элемента в множестве. Он спроектирован невероятно быстрым при минимальном использовании памяти ценой потенциальных ложных срабатываний. Существует возможность получить ложноположительное сра...
6,401
56
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\bloom-filter\README.uk-UA.md
readme
Markdown
# Фільтр Блума **Фільтр Блума** - це просторово-ефективна ймовірна структура даних, створена для перевірки наявності елемента у множині. Він спроектований неймовірно швидким за мінімального використання пам'яті ціною потенційних помилкових спрацьовувань. Існує можливість отримати хибнопозитивне спрацьовування (елемент...
6,016
55
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\disjoint-set\README.md
readme
Markdown
# Disjoint Set _Read this in other languages:_ [_Русский_](README.ru-RU.md), [_Português_](README.pt-BR.md), [_Українська_](README.uk-UA.md) **Disjoint-set** data structure (also called a union–find data structure or merge–find set) is a data structure that tracks a set of elements partitioned into a number of disjoi...
1,642
31
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\disjoint-set\README.pt-BR.md
readme
Markdown
# Conjunto Disjunto (Disjoint Set) **Conjunto Disjunto** **Conjunto Disjunto** é uma estrutura de dados (também chamado de estrutura de dados de union–find ou merge–find) é uma estrutura de dados que rastreia um conjunto de elementos particionados em um número de subconjuntos separados (sem sobreposição). Ele fornece...
1,311
29
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\disjoint-set\README.ru-RU.md
readme
Markdown
# Система непересекающихся множеств **Система непересекающихся множеств** это структура данных (также называемая структурой данной поиска пересечения или множеством поиска слияния), которая управляет множеством элементов, разбитых на несколько непересекающихся подмножеств. Она предоставляет около-константное время вып...
2,057
22
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\disjoint-set\README.uk-UA.md
readme
Markdown
# Система неперетинних множин **Система неперетинних множин** це структура даних (також звана структурою даної пошуку перетину або безліччю пошуку злиття), яка управляє безліччю елементів, розбитих на кілька підмножин, що не перетинаються. Вона надає близько-константний час виконання операцій (обмежений зворотною функ...
1,865
23
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\doubly-linked-list\README.es-ES.md
readme
Markdown
# Lista doblemente enlazada _Lea esto en otros idiomas:_ [_Русский_](README.ru-RU.md), [_简体中文_](README.zh-CN.md), [_日本語_](README.ja-JP.md), [_Português_](README.pt-BR.md) [_한국어_](README.ko-KR.md) En informática, una **lista doblemente enlazada** es una estructura de datos relacionados que consta de un conjunto de reg...
3,441
105
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\doubly-linked-list\README.ja-JP.md
readme
Markdown
# 双方向リスト コンピュータサイエンスにおいて、**双方向リスト**はノードと呼ばれる一連のリンクレコードからなる連結データ構造です。各ノードはリンクと呼ばれる2つのフィールドを持っていて、これらは一連のノード内における前のノードと次のノードを参照しています。最初のノードの前のリンクと最後のノードの次のリンクはある種の終端を示していて、一般的にはダミーノードやnullが格納され、リストのトラバースを容易に行えるようにしています。もしダミーノードが1つしかない場合、リストはその1つのノードを介して循環的にリンクされます。これは、それぞれ逆の順番の単方向のリンクリストが2つあるものとして考えることができます。 ![Doubly L...
3,354
98
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\doubly-linked-list\README.ko-KR.md
readme
Markdown
# Doubly Linked List _Read this in other languages:_ [_Русский_](README.ru-RU.md), [_简体中文_](README.zh-CN.md), [_日本語_](README.ja-JP.md), [_Português_](README.pt-BR.md) 컴퓨터공학에서 **이중 연결 리스트**는 순차적으로 링크된 노드라는 레코드 세트로 구성된 링크된 데이터 구조입니다. 각 노드에는 링크라고 하는 두 개의 필드가 있으며, 노드 순서에서 이전 노드와 다음 노드에 대한 참조를 가집니다. 시작 및 종료 노드의 이전 및 다음 링크...
3,475
110
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\doubly-linked-list\README.md
readme
Markdown
# Doubly Linked List _Read this in other languages:_ [_Русский_](README.ru-RU.md), [_简体中文_](README.zh-CN.md), [_日本語_](README.ja-JP.md), [_Português_](README.pt-BR.md), [_한국어_](README.ko-KR.md), [_Español_](README.es-ES.md), [_Українська_](README.uk-UA.md) In computer science, a **doubly linked list** is a linked data...
3,326
120
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\doubly-linked-list\README.pt-BR.md
readme
Markdown
# Lista Duplamente Ligada (Doubly Linked List) Na ciência da computação, uma **lista duplamente conectada** é uma estrutura de dados vinculada que se consistem em um conjunto de registros sequencialmente vinculados chamados de nós (nodes). Em cada nó contém dois campos, chamados de ligações, que são referenciados ao n...
3,358
114
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\doubly-linked-list\README.ru-RU.md
readme
Markdown
# Двусвязный список **Двусвязный список** — связная структура данных в информатике, состоящая из набора последовательно связанных записей, называемых узлами. Каждый узел содержит два поля, называемых ссылками, которые указывают на предыдущий и последующий элементы в последовательности узлов. Ссылка на предыдущий элеме...
4,572
111
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\doubly-linked-list\README.uk-UA.md
readme
Markdown
# Двобічно зв'язаний список **Двобічно зв'язаний список** — зв'язкова структура даних в інформатиці, що складається з набору послідовно пов'язаних записів, званих вузлами. Кожен вузол містить два поля, званих посиланнями, які вказують на попередній і наступний елементи послідовність вузлів. Посилання на попередній еле...
4,649
110
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\doubly-linked-list\README.zh-CN.md
readme
Markdown
# 双向链表 在计算机科学中, 一个 **双向链表(doubly linked list)** 是由一组称为节点的顺序链接记录组成的链接数据结构。每个节点包含两个字段,称为链接,它们是对节点序列中上一个节点和下一个节点的引用。开始节点和结束节点的上一个链接和下一个链接分别指向某种终止节点,通常是前哨节点或null,以方便遍历列表。如果只有一个前哨节点,则列表通过前哨节点循环链接。它可以被概念化为两个由相同数据项组成的单链表,但顺序相反。 ![Doubly Linked List](./images/doubly-linked-list.jpeg) *Made with [okso.app](https://okso.app)*...
2,831
102
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\graph\README.fr-FR.md
readme
Markdown
# Graph En informatique, un **graphe** est une structure de données abstraite qui implémente les concepts de graphe orienté et de graphe non-orienté venant des mathématiques, plus précisément du domaine de la théorie des graphes. La structure de données abstraite de graphe consiste en un ensemble fini, éventuellement...
927
26
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\graph\README.md
readme
Markdown
# Graph _Read this in other languages:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_Français_](README.fr-FR.md), [_Português_](README.pt-BR.md), [_Українська_](README.uk-UA.md) In computer science, a **graph** is an abstract data type that is meant to implement the undirected graph and directed graph ...
1,384
36
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\graph\README.pt-BR.md
readme
Markdown
# Grafo (Graph) Na ciência da computação, um **grafo** é uma abstração de estrutura de dados que se destina a implementar os conceitos da matemática de grafos direcionados e não direcionados, especificamente o campo da teoria dos grafos. Uma estrutura de dados grafos consiste em um finito (e possivelmente mutável) co...
1,321
29
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\graph\README.ru-RU.md
readme
Markdown
# Граф **Граф** в информатике - абстрактный тип данных, который должен реализовывать концепции направленного и ненаправленного графа в математике, особенно в области теории графов. Структура данных графа состоит из конечного (и возможно изменяющегося) набора вершин или узлов, или точек, совместно с набором ненаправле...
2,727
27
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\graph\README.uk-UA.md
readme
Markdown
# Граф **Граф** в інформатиці - абстрактний тип даних, який має реалізовувати концепції спрямованого та неспрямованого графа у математиці, особливо у галузі теорії графів. Структура даних графа складається з кінцевого (і можливо, що змінюється) набору вершин або вузлів, або точок, спільно з набором ненаправлених пар ...
2,440
25
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\graph\README.zh-CN.md
readme
Markdown
# 图 在计算机科学中, **图(graph)** 是一种抽象数据类型, 旨在实现数学中的无向图和有向图概念,特别是图论领域。 一个图数据结构是一个(由有限个或者可变数量的)顶点/节点/点和边构成的有限集。 如果顶点对之间是无序的,称为无序图,否则称为有序图; 如果顶点对之间的边是没有方向的,称为无向图,否则称为有向图; 如果顶点对之间的边是有权重的,该图可称为加权图。 ![Graph](./images/graph.jpeg) *Made with [okso.app](https://okso.app)* ## 参考 - [Wikipedia](https://en.wikipedia.org/wiki/Gra...
937
23
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\hash-table\README.fr-FR.md
readme
Markdown
# Table de hachage En informatique, une **table de hachage** (carte de hachage) est une structure de données qui implémente un type de données abstrait *tableau nassociatif*, une structure qui permet de *mapper des clés sur des valeurs*. Une table de hachage utilise une *fonction de hachage* pour calculer un index dan...
1,225
32
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\hash-table\README.ja-JP.md
readme
Markdown
# ハッシュテーブル コンピュータサイエンスにおいて、**ハッシュテーブル**(ハッシュマップ)は*キーを値にマッピング*できる*連想配列*の機能を持ったデータ構造です。ハッシュテーブルは*ハッシュ関数*を使ってバケットやスロットの配列へのインデックスを計算し、そこから目的の値を見つけることができます。 理想的には、ハッシュ関数は各キーを一意のバケットに割り当てますが、ほとんどのハッシュテーブルは不完全なハッシュ関数を採用しているため、複数のキーに対して同じインデックスを生成した時にハッシュの衝突が起こります。このような衝突は何らかの方法で対処する必要があります。 ![Hash Table](./images/hash-tab...
1,216
19
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\hash-table\README.ko-KR.md
readme
Markdown
# Hash Table _Read this in other languages:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Français_](README.fr-FR.md), [_Português_](README.pt-BR.md) 컴퓨팅에서, **해시 테이블**(해시 맵)은 키를 값에 매핑할 수 있는 구조인 *연관 배열*을 구현하는 자료 구조입니다. 해시 테이블은 *해시 함수*를 사용해 원하는 값을 담을 수 있는 버킷 또는 슬롯 배열의 인덱스를 계산합니다....
1,361
28
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\hash-table\README.md
readme
Markdown
# Hash Table _Read this in other languages:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Français_](README.fr-FR.md), [_Português_](README.pt-BR.md), [_한국어_](README.ko-KR.md), [_Українська_](README.uk-UA.md) In computing, a **hash table** (hash map) is a data structure which i...
1,275
38
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\hash-table\README.pt-BR.md
readme
Markdown
# Tabela de Hash (Hash Table) Na ciência da computação, uma **tabela de hash** (hash table) é uma estrutura de dados pela qual implementa um tipo de dado abstrado de *array associativo*, uma estrutura que pode *mapear chaves para valores*. Uma tabela de hash utiliza uma *função de hash* para calcular um índice em um _...
1,140
28
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\hash-table\README.ru-RU.md
readme
Markdown
# Хэш таблица **Хеш-таблица** - структура данных, реализующая абстрактный тип данных *ассоциативный массив*, т.е. структура, которая *связывает ключи со значениями*. Хеш-таблица использует *хеш-функцию* для вычисления индекса в массиве, в котором может быть найдено желаемое значение. Ниже представлена хеш-таблица, в к...
2,584
30
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\hash-table\README.uk-UA.md
readme
Markdown
# Геш таблиця **Геш таблиця** - структура даних, що реалізує абстрактний тип даних асоціативний масив, тобто. структура, яка _зв'язує ключі зі значеннями_. Геш-таблиця використовує _геш-функцію_ для обчислення індексу в масиві, в якому може бути знайдено бажане значення. Нижче представлена геш-таблиця, у якій ключем в...
2,467
30
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\hash-table\README.zh-CN.md
readme
Markdown
# 哈希表 在计算中, 一个 **哈希表(hash table 或hash map)** 是一种实现 *关联数组(associative array)* 的抽象数据类型, 该结构可以将 *键映射到值*。 哈希表使用 *哈希函数/散列函数* 来计算一个值在数组或桶(buckets)中或槽(slots)中对应的索引,可使用该索引找到所需的值。 理想情况下,散列函数将为每个键分配给一个唯一的桶(bucket),但是大多数哈希表设计采用不完美的散列函数,这可能会导致"哈希冲突(hash collisions)",也就是散列函数为多个键(key)生成了相同的索引,这种碰撞必须 以某种方式进行处理。 ![Hash Table](....
1,073
26
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\heap\README.fr-FR.md
readme
Markdown
# Tas (structure de données) En informatique, un **tas** est une structure de données arborescente spécialisée qui satisfait la propriété de tas décrite ci-dessous. Dans un *tas minimal* (en anglais *min heap*), si `P` est un nœud parent de `C`, alors la clé (la valeur) de `P` est inférieure ou égale à la clé de `C`....
904
23
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\heap\README.ja-JP.md
readme
Markdown
# ヒープ (データ構造) コンピュータサイエンスにおいて、*ヒープ*は特殊な木構造のデータ構造で、後述するヒープの特性を持っています。 *最小ヒープ*では、もし`P`が`C`の親ノードの場合、`P`のキー(値)は`C`のキーより小さい、または等しくなります。 ![MinHeap](./images/min-heap.jpeg) *Made with [okso.app](https://okso.app)* *最大ヒープ*では、`P`のキーは`C`のキーより大きい、もしくは等しくなります。 ![MaxHeap](./images/max-heap.jpeg) ![Array Representation](./ima...
954
23
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\heap\README.ko-KR.md
readme
Markdown
# 힙 (자료구조) 컴퓨터 과학에서의 **힙**은 아래에 설명된 힙 속성을 만족하는 전문화된 트리 기반 데이터구조입니다. *최소 힙*에서 `P`가 `C`의 상위 노드라면 `P`의 키(값)는 `C`의 키보다 작거나 같습니다. ![MinHeap](./images/min-heap.jpeg) *Made with [okso.app](https://okso.app)* *최대 힙*에서 `P`의 키는 `C`의 키보다 크거나 같습니다. ![MaxHeap](./images/max-heap.jpeg) ![Array Representation](./images/array-re...
830
24
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\heap\README.md
readme
Markdown
# Heap (data-structure) _Read this in other languages:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Français_](README.fr-FR.md), [_Português_](README.pt-BR.md), [_Türkçe_](README.tr-TR.md), [_한국어_](README.ko-KR.md), [_Українська_](README.uk-UA.md) In computer science, a **hea...
3,568
70
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\heap\README.pt-BR.md
readme
Markdown
# Heap (estrutura de dados) Na ciência da computação, um **heap** é uma estrutura de dados baseada em uma árvore especializada que satisfaz a propriedade _heap_ descrita abaixo. Em um *heap mínimo* (min heap), caso `P` é um nó pai de `C`, então a chave (o valor) de `P` é menor ou igual a chave de `C`. ![MinHeap](./i...
867
26
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\heap\README.ru-RU.md
readme
Markdown
# Куча (структура данных) В компьютерных науках куча — это специализированная структура данных типа дерево, которая удовлетворяет свойству кучи: если B является узлом-потомком узла A, то ключ(A) ≥ ключ(B). Из этого следует, что элемент с наибольшим ключом всегда является корневым узлом кучи, поэтому иногда такие кучи ...
1,801
27
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\heap\README.tr-TR.md
readme
Markdown
# Heap (data-structure) Bilgisayar biliminde, **yığın (heap)** aşağıda açıklanan özellikleri karşılayan ağaç tabanlı(tree-based) özel bir veri yapısıdır. *min heap*, Eğer `P`, `C`'nin üst düğümü ise, `P`'nin anahtarı (değeri) `C`'nin anahtarından (değerinden) küçük veya ona eşittir. ![MinHeap](./images/min-heap.jpe...
883
23
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\heap\README.uk-UA.md
readme
Markdown
# Купа (структура даних) У комп'ютерних науках купа - це спеціалізована структура даних на кшталт дерева, яка задовольняє властивості купи: якщо B є вузлом-нащадком вузла A, то ключ (A) ≥ ключ (B). З цього випливає, що елемент із найбільшим ключем завжди є кореневим вузлом купи, тому іноді такі купи називають max-купа...
1,731
26
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\heap\README.zh-CN.md
readme
Markdown
# 堆 (数据结构) 在计算机科学中, 一个 **堆(heap)** 是一种特殊的基于树的数据结构,它满足下面描述的堆属性。 在一个 *最小堆(min heap)* 中, 如果 `P` 是 `C` 的一个父级节点, 那么 `P` 的key(或value)应小于或等于 `C` 的对应值. ![M最小堆](./images/min-heap.jpeg) *Made with [okso.app](https://okso.app)* 在一个 *最大堆(max heap)* 中, `P` 的key(或value)大于 `C` 的对应值。 ![堆](./images/max-heap.jpeg) ![Array Repr...
842
24
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\linked-list\README.es-ES.md
readme
Markdown
# Lista Enlazada (Linked List) _Lee este artículo en otros idiomas:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Português_](README.pt-BR.md) [_English_](README.md) En ciencias de la computación una **lista enlazada** es una colección lineal de elementos, en los cuales el or...
4,050
166
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\linked-list\README.ja-JP.md
readme
Markdown
# リンクリスト コンピュータサイエンスにおいて、**リンクリスト**はデータ要素の線形コレクションです。要素の順番はメモリ内の物理的な配置によっては決まりません。代わりに、各要素が次の要素を指しています。リンクリストはノードのグループからなるデータ構造です。最も単純な形式では、各ノードはデータとシーケンス内における次のノードへの参照(つまり、リンク)で構成されています。この構造はイテレーションにおいて任意の位置へ要素を効率的に挿入、削除することを可能にしています。より複雑なリンクリストではリンクをさらに追加することで、任意の要素の参照から要素を効率的に挿入、削除することを可能にしています。リンクリストの欠点はアクセスタイムが線形...
3,945
144
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\linked-list\README.ko-KR.md
readme
Markdown
# 링크드 리스트 _Read this in other languages:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Português_](README.pt-BR.md) 컴퓨터과학에서, **링크드 리스트**는 데이터 요소의 선형 집합이며, 이 집합에서 논리적 저장 순서는 메모리의 물리적 저장 순서와 일치하지 않습니다. 그 대신, 각각의 원소들은 자기 자신 다음의 원소를 가리킵니다. **링크드 리스트**는 순서를 표현하는 노드들의 집합으로 이루어져 있습니다....
3,960
152
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\linked-list\README.md
readme
Markdown
# Linked List _Read this in other languages:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Português_](README.pt-BR.md), [_한국어_](README.ko-KR.md), [_Español_](README.es-ES.md), [_Türkçe_](README.tr-TR.md), [_Українська_](README.uk-UA.md) In computer science, a **linked list** i...
4,002
171
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\linked-list\README.pt-BR.md
readme
Markdown
# Lista Encadeada (Linked List) Na ciência da computação, uma **lista encadeada** é uma coleção linear de elementos de dados, em que a ordem linear não é dada por sua locação física na memória. Em vez disso, cada elemento aponta para o próximo. É uma estrutura de dados consistindo em um grupo de nós que juntos represe...
3,874
160
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\linked-list\README.ru-RU.md
readme
Markdown
# Связный список Связный список — базовая динамическая структура данных в информатике, состоящая из узлов, каждый из которых содержит как собственно данные,так ссылку («связку») на следующий узел списка. Данная структура позволяет эффективно добавлять и удалять элементы на произвольной позиции в последовательности в п...
5,018
148
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\linked-list\README.tr-TR.md
readme
Markdown
# Bağlantılı Liste _Bunu diğer dillerde okuyun:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Português_](README.pt-BR.md), [_한국어_](README.ko-KR.md), [_Español_](README.es-ES.md), Bilgisayar bilimlerinde, **Bağlantılı liste**, her biri hem gerçek verileri hem de listedeki bir s...
3,785
162
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\linked-list\README.uk-UA.md
readme
Markdown
# Зв'язаний список Зв'язаний список — базова динамічна структура даних в інформатиці, що складається з вузлів, кожен з яких містить як дані, так і посилання («зв'язку») на наступний вузол списку. Ця структура даних дозволяє ефективно додавати та видаляти елементи на довільній позиції у послідовності у процесі ітерації...
4,832
148
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\linked-list\README.vi-VN.md
readme
Markdown
# Danh sách liên kết (Linked List) _Đọc bằng ngôn ngữ khác:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Português_](README.pt-BR.md), [_한국어_](README.ko-KR.md), [_Español_](README.es-ES.md), [_Türkçe_](README.tr-TR.md), [_Українська_](README.uk-UA.md) Trong khoa học máy tính,...
4,684
156
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\linked-list\README.zh-CN.md
readme
Markdown
# 链表 在计算机科学中, 一个 **链表** 是数据元素的线性集合, 元素的线性顺序不是由它们在内存中的物理位置给出的。 相反, 每个元素指向下一个元素。它是由一组节点组成的数据结构,这些节点一起,表示序列。 在最简单的形式下,每个节点由数据和到序列中下一个节点的引用(换句话说,链接)组成。这种结构允许在迭代期间有效地从序列中的任何位置插入或删除元素。 更复杂的变体添加额外的链接,允许有效地插入或删除任意元素引用。链表的一个缺点是访问时间是线性的(而且难以管道化)。 更快的访问,如随机访问,是不可行的。与链表相比,数组具有更好的缓存位置。 ![Linked List](./images/linked-list.jpeg)...
3,511
150
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\lru-cache\README.ko-KR.md
readme
Markdown
# LRU 캐시 알고리즘 **LRU 캐시 알고리즘** 은 사용된 순서대로 아이템을 정리함으로써, 오랜 시간 동안 사용되지 않은 아이템을 빠르게 찾아낼 수 있도록 한다. 한방향으로만 옷을 걸 수 있는 옷걸이 행거를 생각해봅시다. 가장 오랫동안 입지 않은 옷을 찾기 위해서는, 행거의 반대쪽 끝을 보면 됩니다. ## 문제 정의 LRUCache 클래스를 구현해봅시다: - `LRUCache(int capacity)` LRU 캐시를 **양수** 의 `capacity` 로 초기화합니다. - `int get(int key)` `key` 가 존재할 경우 `key` 값을 반환...
3,521
52
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\lru-cache\README.md
readme
Markdown
# Least Recently Used (LRU) Cache _Read this in other languages:_ [한국어](README.ko-KR.md), A **Least Recently Used (LRU) Cache** organizes items in order of use, allowing you to quickly identify which item hasn't been used for the longest amount of time. Picture a clothes rack, where clothes are always hung up on one...
3,038
55
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\priority-queue\README.fr-FR.md
readme
Markdown
# File de priorité En informatique, une **file de priorité** est un type de données abstrait qui s'apparente à une file d'attente normale ou une structure de données empilées, mais où chaque élément est en plus associé à une "priorité". Dans une file de priorité, un élément avec une priorité élevée est servi avant un ...
1,101
23
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\priority-queue\README.ja-JP.md
readme
Markdown
# 優先度付きキュー コンピュータサイエンスにおいて、**優先度付きキュー**は通常のキューやスタックのデータ構造と似た抽象データ型ですが、各要素に「優先度」が関連づけられています。優先度付きキューでは優先度の高い要素が優先度の低い要素よりも先に処理されます。もし2つの要素が同じ優先度だった場合、それらはキュー内の順序に従って処理されます。 優先度付きキューは多くの場合ヒープによって実装されていますが、概念的にはヒープとは異なります。優先度付きキューは「リスト」や「マップ」のような抽象的な概念です。リストがリンクリストや配列で実装できるのと同様に、優先度付きキューはヒープや未ソート配列のような様々な方法で実装することができます。...
1,126
11
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\priority-queue\README.ko-KR.md
readme
Markdown
# 우선 순위 큐 컴퓨터 과학에서 **우선 순위 큐**는 일반 큐 또는 스택 데이터 구조와 같은 추상 데이터 유형이지만, 여기서 각 요소에는 "우선 순위"가 연결됩니다. 우선 순위 큐에서는 우선 순위가 높은 요소가 낮은 요소 앞에 제공됩니다. 두 요소가 동일한 우선 순위를 가질 경우 큐의 순서에 따라 제공됩니다. 우선 순위 큐는 종종 힙을 사용하여 구현되지만 개념적으로는 힙과 구별됩니다. 우선 순위 대기열은 "리스트(list)" 또는 "맵(map)"과 같은 추상적인 개념입니다; 리스트가 링크드 리스트나 배열로 구현될 수 있는 것처럼 우선 순위 큐는 힙이나 정...
1,019
13
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\priority-queue\README.md
readme
Markdown
# Priority Queue _Read this in other languages:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Français_](README.fr-FR.md), [_Português_](README.pt-BR.md), [_한국어_](README.ko-KR.md), [_Українська_](README.uk-UA.md) In computer science, a **priority queue** is an abstract data typ...
1,230
30
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\priority-queue\README.pt-BR.md
readme
Markdown
# Fila de Prioridade (Priority Queue) Na ciência da computação, uma **fila de prioridade** é um tipo de estrutura de dados abastrata que é como uma fila regular (regular queue) ou estrutura de dados de pilha (stack), mas adicionalmente cada elemento possui uma "prioridade" associada. Em uma fila de prioridade, um ele...
1,197
24
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\priority-queue\README.ru-RU.md
readme
Markdown
# Очередь с приоритетом Очередь с приоритетом (англ. priority queue) — абстрактный тип данных в информатике, для каждого элемента которого можно вычислить его приоритет. В очереди с приоритетами элемент с высоким приоритетом обслуживается раньше элемента с низким приоритетом. Если два элемента имеют одинаковый приори...
1,970
23
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\priority-queue\README.uk-UA.md
readme
Markdown
# Черга з пріоритетом Черга з пріоритетом (англ. priority queue) - абстрактний тип даних в інформатиці, для кожного елемента якого можна визначити його пріоритет. У черзі з пріоритетами елемент із високим пріоритетом обслуговується раніше елемент з низьким пріоритетом. Якщо два елементи мають однаковий пріоритет, вон...
1,782
22
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\priority-queue\README.zh-CN.md
readme
Markdown
# 优先队列 在计算机科学中, **优先级队列(priority queue)** 是一种抽象数据类型, 它类似于常规的队列或栈, 但每个元素都有与之关联的“优先级”。 在优先队列中, 低优先级的元素之前前面应该是高优先级的元素。 如果两个元素具有相同的优先级, 则根据它们在队列中的顺序是它们的出现顺序即可。 优先队列虽通常用堆来实现,但它在概念上与堆不同。优先队列是一个抽象概念,就像“列表”或“图”这样的抽象概念一样; 正如列表可以用链表或数组实现一样,优先队列可以用堆或各种其他方法实现,例如无序数组。 ## 参考 - [Wikipedia](https://en.wikipedia.org/wiki/Prior...
883
16
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\queue\README.fr-FR.md
readme
Markdown
# File En informatique, une **file**, aussi appelée file d'attente, est sorte particulière de structure de données abstraite dans lequel les entités de la collection sont conservées dans l'ordre et les opérations principales sur la collection sont le résultat de l'ajout d'entités à la position terminale arrière, connu...
1,616
31
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\queue\README.ja-JP.md
readme
Markdown
# キュー コンピュータサイエンスにおいて、**キュー**は特定の種類の抽象データ型またはコレクションです。コレクションの中のエンティティは順番に並べられており、コレクションに対する基本的な(または唯一の)操作は末尾にエンティティを追加するエンキューと、先頭からエンティティを削除するデキューがあります。これにより、キューは先入れ先出し(FIFO)のデータ構造となります。FIFOのデータ構造では、キューに追加された最初の要素が最初に削除されます。これは、新しい要素が追加されたら、その要素を削除するにはそれまでに追加された全ての要素が削除されなければならないという要件と同じです。多くの場合、ピークのような先頭の要素を検査する操作も備え...
1,439
15
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\queue\README.ko-KR.md
readme
Markdown
# Queue _Read this in other languages:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Français_](README.fr-FR.md), [_Português_](README.pt-BR.md) 컴퓨터 공학에서 **큐**는 일종의 추상 데이터 타입이자 컬렉션입니다. 큐 내부의 엔터티들은 순서를 유지하며 컬렉션의 가장 뒷 부분에 엔터티를 추가하는 인큐(enqueue), 컬렉션의 가장 앞에 위치한 엔터티를 제거하는 디큐(dequeue...
1,500
24
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\queue\README.md
readme
Markdown
# Queue _Read this in other languages:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Français_](README.fr-FR.md), [_Português_](README.pt-BR.md), [_한국어_](README.ko-KR.md), [_Українська_](README.uk-UA.md) In computer science, a **queue** is a particular kind of abstract data typ...
1,539
38
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\queue\README.pt-BR.md
readme
Markdown
# Fila (Queue) Na ciência da computação, uma **fila** é um tipo particular de abstração de tipo de dado ou coleção em que as entidades na coleção são mantidas em ordem e a causa primária (ou única) de operações na coleção são a adição de entidades à posição final da coleção, conhecido como enfileiramento (enqueue) e a...
1,410
31
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\queue\README.ru-RU.md
readme
Markdown
# Очередь Очередь (англ. queue) - структура данных в информатике, в которой элементы хранятся в порядке их добавления. Добавление новых элементов(enqueue) осуществляется в конец списка. А удаление элементов (dequeue) осуществляется с начала. Таким образом очередь реализует принцип "первым вошёл - первым вышел" (FIFO)....
1,368
22
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\queue\README.uk-UA.md
readme
Markdown
# Черга Черга (англ. queue) – структура даних в інформатиці, в якій елементи зберігаються у порядку їх додавання. Додавання нових елементів(enqueue) здійснюється на кінець списку. А видалення елементів (dequeue) здійснюється із початку. Таким чином черга реалізує принцип "першим увійшов – першим вийшов" (FIFO). Часто ...
1,314
22
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\queue\README.vi-VN.md
readme
Markdown
# Hàng đợi (Queue) _Đọc bằng ngôn ngữ khác:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Português_](README.pt-BR.md), [_한국어_](README.ko-KR.md), [_Українська_](README.uk-UA.md) Trong khoa học máy tính, một **hàng đợi** là một loại cụ thể của kiểu dữ liệu trừu tượng hoặc bộ sưu...
1,996
23
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\queue\README.zh-CN.md
readme
Markdown
# 队列 在计算机科学中, 一个 **队列(queue)** 是一种特殊类型的抽象数据类型或集合。集合中的实体按顺序保存。 队列基本操作有两种:入队和出队。从队列的后端位置添加实体,称为入队;从队列的前端位置移除实体,称为出队。 队列中元素先进先出 FIFO (first in, first out)的示意 ![Queue](./images/queue.jpeg) *Made with [okso.app](https://okso.app)* ## 参考 - [Wikipedia](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)) - [YouTu...
653
18
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\stack\README.fr-FR.md
readme
Markdown
# Pile En informatique, une **pile** est un type de données abstrait qui sert de collection d'éléments, avec deux opérations principales: * **empiler** (en anglais *push*), qui ajoute un élément à la collection, et * **dépiler** (en anglais *pop*), qui supprime l'élément le plus récemment ajouté qui n'a pas encore ét...
1,332
31
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\stack\README.ja-JP.md
readme
Markdown
# スタック コンピュータサイエンスにおいて、**スタック**は抽象データ型で、2つの主要な操作ができる要素のコレクションです。 * **プッシュ**はコレクションに要素を追加します。 * **ポップ**は最近追加された要素でまだ削除されていないものを削除します。 要素がスタックから外れる順番から、LIFO(後入れ先出し)とも呼ばれます。スタックに変更を加えることなく、先頭の要素を検査するピーク操作を備えることもあります。「スタック」という名前は、物理的な物を上に積み重ねていく様子との類似性に由来しています。一番上の物を取ることは簡単ですが、スタックの下の方にあるものを取るときは先に上にある複数の物を取り除く必要があります。 ...
1,208
20
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\stack\README.ko-KR.md
readme
Markdown
# 스택 _Read this in other languages:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Français_](README.fr-FR.md), [_Português_](README.pt-BR.md) 컴퓨터 과학에서, **스택**은 아래의 두가지 연산을 가진 요소들의 집합인 추상 자료형입니다. * **push**는 집합에 요소를 추가하는 것이며, * **pop**은 아직 제거되지 않은 가장 최근에 추가된 요소를 제거하는 연산입니다. 요소...
1,413
27
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\stack\README.md
readme
Markdown
# Stack _Read this in other languages:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Français_](README.fr-FR.md), [_Português_](README.pt-BR.md), [_한국어_](README.ko-KR.md), [_Українська_](README.uk-UA.md) In computer science, a **stack** is an abstract data type that serves as a...
1,409
37
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\stack\README.pt-BR.md
readme
Markdown
# Pilha (Stack) Na ciência da computação, uma **pilha** é uma estrutura de dados abstrata que serve como uma coleção de elementos com duas operações principais: * **push**, pela qual adiciona um elemento à coleção, e * **pop**, pela qual remove o último elemento adicionado. A ordem em que os elementos saem de um _st...
1,171
29
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\stack\README.ru-RU.md
readme
Markdown
# Стек Стек (англ. stack — стопка) — абстрактный тип данных, представляющий собой список элементов, организованных по принципу LIFO (последним пришёл — первым вышел). Стек имеет две ключевые операции: * **добавление (push)** элемента в конец стека, и * **удаление (pop)**, последнего добавленного элемента. Дополнител...
1,264
26
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\stack\README.uk-UA.md
readme
Markdown
# Стек Стек (англ. stack - стопка) - абстрактний тип даних, що представляє собою список елементів, організованих за принципом LIFO (останнім прийшов – першим вийшов). Стек має дві ключові операції: * **додавання (push)** елемента в кінець стеку, та * **видалення (pop)**, останнього доданого елемента. Додаткова опера...
1,262
26
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\stack\README.vi-VN.md
readme
Markdown
# Ngăn xếp (stack) _Đọc bằng ngôn ngữ khác:_ [_简体中文_](README.zh-CN.md), [_Русский_](README.ru-RU.md), [_日本語_](README.ja-JP.md), [_Português_](README.pt-BR.md), [_한국어_](README.ko-KR.md), [_Español_](README.es-ES.md), [_Українська_](README.uk-UA.md) Trong khoa học máy tính, một ngăn xếp (stack) là một kiểu dữ liệu trừu...
1,769
28
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\stack\README.zh-CN.md
readme
Markdown
# 栈 在计算机科学中, 一个 **栈(stack)** 是一种抽象数据类型,用作表示元素的集合,具有两种主要操作: * **push**, 添加元素到栈的顶端(末尾); * **pop**, 移除栈最顶端(末尾)的元素. 以上两种操作可以简单概括为“后进先出(LIFO = last in, first out)”。 此外,应有一个 `peek` 操作用于访问栈当前顶端(末尾)的元素。 "栈"这个名称,可类比于一组物体的堆叠(一摞书,一摞盘子之类的)。 栈的 push 和 pop 操作的示意 ![Stack](./images/stack.jpeg) *Made with [okso.app](https://oks...
815
24
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\tree\avl-tree\README.md
readme
Markdown
# AVL Tree _Read this in other languages:_ [_Português_](README.pt-BR.md) In computer science, an **AVL tree** (named after inventors Adelson-Velsky and Landis) is a self-balancing binary search tree. It was the first such data structure to be invented. In an AVL tree, the heights of the two child subtrees of any ...
2,081
52
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\tree\avl-tree\README.pt-BR.md
readme
Markdown
# Árvore AVL (AVL Tree) Na ciência da computação, uma **árvore AVL** (em homenagem aos inventores Adelson-Velsky e Landis) é uma árvore de pesquisa binária auto balanceada. Foi a primeira estrutura de dados a ser inventada. Em uma árvore AVL, as alturas de duas sub-árvores filhas de qualquer nó diferem no máximo em um...
2,156
51
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\tree\binary-search-tree\README.md
readme
Markdown
# Binary Search Tree _Read this in other languages:_ [_Português_](README.pt-BR.md) In computer science, **binary search trees** (BST), sometimes called ordered or sorted binary trees, are a particular type of container: data structures that store "items" (such as numbers, names etc.) in memory. They allow fast looku...
7,101
281
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\tree\binary-search-tree\README.pt-BR.md
readme
Markdown
# Árvore de Pesquisa Binária (Binary Search Tree) Na ciência da computação **binary search trees** (BST), algumas vezes chamadas de árvores binárias ordenadas (_ordered or sorted binary trees_), é um tipo particular de container: estruturas de dados que armazenam "itens" (como números, nomes, etc.) na memória. Permite...
7,468
279
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\tree\fenwick-tree\README.md
readme
Markdown
# Fenwick Tree / Binary Indexed Tree _Read this in other languages:_ [_Português_](README.pt-BR.md) A **Fenwick tree** or **binary indexed tree** is a data structure that can efficiently update elements and calculate prefix sums in a table of numbers. When compared with a flat array of numbers, the Fenwick tree a...
1,975
41
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\tree\fenwick-tree\README.pt-BR.md
readme
Markdown
# Árvore Fenwick / Árvore Binária Indexada (Fenwick Tree / Binary Indexed Tree) Uma **árvore Fenwick** ou **árvore binária indexada** é um tipo de estrutura de dados que consegue eficiemente atualizar elementos e calcular soma dos prefixos em uma tabela de números. Quando comparado com um _flat array_ de números, a á...
2,196
43
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\tree\README.md
readme
Markdown
# Tree _Read this in other languages:_ [_简体中文_](README.zh-CN.md), [_Português_](README.pt-BR.md) * [Binary Search Tree](binary-search-tree) * [AVL Tree](avl-tree) * [Red-Black Tree](red-black-tree) * [Segment Tree](segment-tree) - with min/max/sum range queries examples * [Fenwick Tree](fenwick-tree) (Binary Indexed ...
1,381
38
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\tree\README.pt-BR.md
readme
Markdown
# Árvore (Tree) * [Árvore de Pesquisa Binária (Binary Search Tree)](binary-search-tree/README.pt-BR.md) * [Árvore AVL (AVL Tree)](avl-tree/README.pt-BR.md) * [Árvore Vermelha-Preta (Red-Black Tree)](red-black-tree/README.pt-BR.md) * [Árvore de Segmento (Segment Tree)](segment-tree/README.pt-BR.md) - com exemplos de co...
1,634
33
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\tree\README.zh-CN.md
readme
Markdown
# 树 * [二叉搜索树](binary-search-tree) * [AVL树](avl-tree) * [红黑树](red-black-tree) * [线段树](segment-tree) - with min/max/sum range queries examples * [芬威克树/Fenwick Tree](fenwick-tree) (Binary Indexed Tree) 在计算机科学中, **树(tree)** 是一种广泛使用的抽象数据类型(ADT)— 或实现此ADT的数据结构 — 模拟分层树结构, 具有根节点和有父节点的子树,表示为一组链接节点。 树可以被(本地地)递归定义为一个(始于一个根节点的)节...
1,157
27
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\tree\red-black-tree\README.md
readme
Markdown
# Red–Black Tree _Read this in other languages:_ [_Português_](README.pt-BR.md) A **red–black tree** is a kind of self-balancing binary search tree in computer science. Each node of the binary tree has an extra bit, and that bit is often interpreted as the color (red or black) of the node. These color bits are us...
4,309
97
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\tree\red-black-tree\README.pt-BR.md
readme
Markdown
# Árvore Vermelha-Preta (Red-Black Tree) Uma **árvore vermelha-preta** é um tipo de árvore de pesquisa binária auto balanceada na ciência da computação. Cada nó da árvore binária possui um _bit_ extra, e este _bit_ é frequentemente interpretado com a cor (vermelho ou preto) do nó. Estas cores de _bits_ são utilizadas...
4,789
93
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\tree\segment-tree\README.md
readme
Markdown
# Segment Tree _Read this in other languages:_ [_Português_](README.pt-BR.md) In computer science, a **segment tree** also known as a statistic tree is a tree data structure used for storing information about intervals, or segments. It allows querying which of the stored segments contain a given point. It is, in ...
2,319
54
javascript-algorithms
trekhleb/javascript-algorithms
trekhleb
195,878
MIT
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
src\data-structures\tree\segment-tree\README.pt-BR.md
readme
Markdown
# Árvore de Segmento (Segment Tree) Na ciência da computação, uma **árvore de segmento** também conhecida como árvore estatística é uma árvore de estrutura de dados utilizadas para armazenar informações sobre intervalores ou segmentos. Ela permite pesquisas no qual os segmentos armazenados contém um ponto fornecido. I...
2,625
49