Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/can-dy-jack/algorithm
JavaScript算法与数据结构库
https://github.com/can-dy-jack/algorithm
algorithms data-structures double-linked-list heap linked-list priority-queue queue stack
Last synced: 20 days ago
JSON representation
JavaScript算法与数据结构库
- Host: GitHub
- URL: https://github.com/can-dy-jack/algorithm
- Owner: can-dy-jack
- License: mit
- Created: 2021-12-18T09:40:31.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-18T06:58:18.000Z (almost 2 years ago)
- Last Synced: 2024-12-02T05:47:07.925Z (about 1 month ago)
- Topics: algorithms, data-structures, double-linked-list, heap, linked-list, priority-queue, queue, stack
- Homepage:
- Size: 847 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JavaScript算法与数据结构库
## 数据结构
- 单向链表/双向链表:[LinkedList / DoubleLinkedList](https://github.com/can-dy-jack/linkedlist)
- *循环链表 - 最后一个结点的指针域指向头结点,整个链表形成一个环*
- 堆: [MaxHeap / MinHeap](https://github.com/can-dy-jack/heap)
- 堆排序:[maxHeapSort / minHeapSort](https://github.com/can-dy-jack/heap)
- Top K 大:
- 最大堆解决 => 最小堆解决
- Top K 小:
- 最小堆解决 => 最大堆解决
- 优先队列: [PriorityQueue](https://github.com/can-dy-jack/priority-queue)
- 栈: [Stack](https://github.com/can-dy-jack/stack)
- 队列: [Queue](https://github.com/can-dy-jack/queue)### npm
javascript data structure repository.
js数据结构集成库。> sum up all data structures of @kartjim into a single repository.
```sh
npm i structure-extend
```
or use yarn
```sh
yarn add structure-extend
```
#### import```js
const {
Queue,
Stack,
MaxHeap,
MinHeap,
minHeapSort,
maxHeapSort,
PriorityQueue,
LinkedList,
DoubleLinkedList,
LinkedListNode,
DoubleLinkedListNode
} = require('structure-extend')
```
or use ESM:
```js
import {
Queue,
Stack,
MaxHeap,
MinHeap,
minHeapSort,
maxHeapSort,
PriorityQueue,
LinkedList,
DoubleLinkedList,
LinkedListNode,
DoubleLinkedListNode,
} from 'structure-extend';
```## 算法 计划中~
数组相关、字符串相关、双指针、滑动窗口、二分、位运算、DFS、BFS、回溯、字典树、前缀树、并查集、线段树、树状数组、记忆化搜索、分治、DP、贪心、图论、数论。。。数组相关:
- 前缀和
- 差分