本仓库主要用于记录数据结构和算法相关的心得和一些练习。
JavaScript+TypeScript+Jest
├── 00_common
│ └── Node.ts
├── 01_linkList
│ ├── SingleLinked.ts
│ ├── SingleLinkedList.test.ts
│ └── linkedList.md
├── 02_stack
│ ├── browser-forward-back
│ │ ├── Browser-forward-back.test.ts
│ │ └── Browser-forward-back.ts
│ ├── stack-array
│ │ ├── Stack.test.ts
│ │ └── Stack.ts
│ └── stack-link
│ ├── Stack.test.ts
│ └── Stack.ts
├── 03_queue
│ ├── circle_queue_array
│ │ ├── Queue.test.ts
│ │ └── Queue.ts
│ └── queue_link
│ ├── Queue.test.ts
│ └── Queue.ts
├── 04_sort
│ ├── Sort.test.ts
│ └── Sort.ts
├── 05_binarySearch
│ ├── binarySearch.test.ts
│ └── binarySearch.ts
├── 06_skiplist
│ ├── Node.ts
│ ├── skiplist.test.ts
│ └── skiplist.ts
├── 07_binaryTree
│ ├── Node.ts
│ ├── SearchBinaryTree.test.ts
│ └── SearchBinaryTree.ts
├── 08_heap
│ ├── MaxHeap.test.ts
│ └── Heap.ts
├── 09_graph
│ ├── graph
│ │ ├── graph.test.ts
│ │ └── graph.ts
│ ├── minSpanTree
│ │ ├── Edge.ts
│ │ ├── miniSpanTree.test.ts
│ │ └── miniSpanTree.ts
│ ├── shortestPath
│ │ ├── shortestPath.test.ts
│ │ └── shortestPath.ts
│ └── topological
│ ├── EdgeNode.ts
│ ├── VertexNode.ts
│ ├── topologicalSort
│ │ ├── topologicalSort.test.ts
│ │ └── topologicalSort.ts
│ └── topologicalWithWeight
│ ├── topologicalWithWeight.test.ts
│ └── topologicalWithWeight.ts
└── 10_string_match
├── AcTrie
│ ├── trie.test.ts
│ └── trie.ts
├── badCharacterRule
│ ├── badCharacterRule.test.ts
│ └── badCharacterRule.ts
├── goodSuffixShift
│ ├── goodSuffixShift.test.ts
│ └── goodSuffixShift.ts
├── kmp
│ ├── kmp.test.ts
│ └── kmp.ts
├── stringMatch.test.ts
└── trie
├── trie.test.ts
└── trie.ts
- npm install
- npm run test,可以看 UT