data-structure-typed 2.4.5 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/.vitepress/cache/deps_temp_51f5f1b0/chunk-7OIKW5WK.js +12984 -0
  2. package/.vitepress/cache/deps_temp_51f5f1b0/package.json +3 -0
  3. package/.vitepress/cache/deps_temp_51f5f1b0/vitepress___@vue_devtools-api.js +4505 -0
  4. package/.vitepress/cache/deps_temp_51f5f1b0/vitepress___@vueuse_core.js +9731 -0
  5. package/.vitepress/cache/deps_temp_51f5f1b0/vue.js +347 -0
  6. package/CHANGELOG.md +3 -1
  7. package/README.md +78 -31
  8. package/dist/cjs/binary-tree.cjs +23698 -0
  9. package/dist/cjs/graph.cjs +5236 -0
  10. package/dist/cjs/hash.cjs +1262 -0
  11. package/dist/cjs/heap.cjs +1540 -0
  12. package/dist/cjs/index.cjs +24509 -2899
  13. package/dist/cjs/linked-list.cjs +4370 -0
  14. package/dist/cjs/matrix.cjs +1042 -0
  15. package/dist/cjs/priority-queue.cjs +1314 -0
  16. package/dist/cjs/queue.cjs +4090 -0
  17. package/dist/cjs/stack.cjs +861 -0
  18. package/dist/cjs/trie.cjs +1173 -0
  19. package/dist/cjs-legacy/binary-tree.cjs +23730 -0
  20. package/dist/cjs-legacy/graph.cjs +5234 -0
  21. package/dist/cjs-legacy/hash.cjs +1262 -0
  22. package/dist/cjs-legacy/heap.cjs +1537 -0
  23. package/dist/cjs-legacy/index.cjs +32555 -10936
  24. package/dist/cjs-legacy/linked-list.cjs +4376 -0
  25. package/dist/cjs-legacy/matrix.cjs +1045 -0
  26. package/dist/cjs-legacy/priority-queue.cjs +1312 -0
  27. package/dist/cjs-legacy/queue.cjs +4088 -0
  28. package/dist/cjs-legacy/stack.cjs +861 -0
  29. package/dist/cjs-legacy/trie.cjs +1172 -0
  30. package/dist/esm/binary-tree.mjs +23683 -0
  31. package/dist/esm/graph.mjs +5223 -0
  32. package/dist/esm/hash.mjs +1259 -0
  33. package/dist/esm/heap.mjs +1534 -0
  34. package/dist/esm/index.mjs +24507 -2898
  35. package/dist/esm/linked-list.mjs +4363 -0
  36. package/dist/esm/matrix.mjs +1038 -0
  37. package/dist/esm/priority-queue.mjs +1310 -0
  38. package/dist/esm/queue.mjs +4086 -0
  39. package/dist/esm/stack.mjs +859 -0
  40. package/dist/esm/trie.mjs +1170 -0
  41. package/dist/esm-legacy/binary-tree.mjs +23715 -0
  42. package/dist/esm-legacy/graph.mjs +5221 -0
  43. package/dist/esm-legacy/hash.mjs +1259 -0
  44. package/dist/esm-legacy/heap.mjs +1531 -0
  45. package/dist/esm-legacy/index.mjs +32553 -10935
  46. package/dist/esm-legacy/linked-list.mjs +4369 -0
  47. package/dist/esm-legacy/matrix.mjs +1041 -0
  48. package/dist/esm-legacy/priority-queue.mjs +1308 -0
  49. package/dist/esm-legacy/queue.mjs +4084 -0
  50. package/dist/esm-legacy/stack.mjs +859 -0
  51. package/dist/esm-legacy/trie.mjs +1169 -0
  52. package/dist/types/data-structures/base/index.d.ts +1 -0
  53. package/dist/types/data-structures/base/iterable-element-base.d.ts +1 -1
  54. package/dist/types/data-structures/base/iterable-entry-base.d.ts +8 -8
  55. package/dist/types/data-structures/base/linear-base.d.ts +3 -3
  56. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +368 -51
  57. package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +473 -147
  58. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +931 -80
  59. package/dist/types/data-structures/binary-tree/bst.d.ts +792 -29
  60. package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +592 -32
  61. package/dist/types/data-structures/binary-tree/segment-tree.d.ts +320 -135
  62. package/dist/types/data-structures/binary-tree/tree-map.d.ts +3662 -6
  63. package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +3487 -201
  64. package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +2778 -65
  65. package/dist/types/data-structures/binary-tree/tree-set.d.ts +3414 -6
  66. package/dist/types/data-structures/graph/abstract-graph.d.ts +4 -4
  67. package/dist/types/data-structures/graph/directed-graph.d.ts +419 -47
  68. package/dist/types/data-structures/graph/map-graph.d.ts +59 -1
  69. package/dist/types/data-structures/graph/undirected-graph.d.ts +384 -59
  70. package/dist/types/data-structures/hash/hash-map.d.ts +462 -89
  71. package/dist/types/data-structures/heap/heap.d.ts +567 -99
  72. package/dist/types/data-structures/heap/max-heap.d.ts +46 -0
  73. package/dist/types/data-structures/heap/min-heap.d.ts +59 -0
  74. package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +631 -49
  75. package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +581 -68
  76. package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +775 -12
  77. package/dist/types/data-structures/matrix/matrix.d.ts +491 -0
  78. package/dist/types/data-structures/priority-queue/max-priority-queue.d.ts +57 -0
  79. package/dist/types/data-structures/priority-queue/min-priority-queue.d.ts +60 -0
  80. package/dist/types/data-structures/priority-queue/priority-queue.d.ts +60 -0
  81. package/dist/types/data-structures/queue/deque.d.ts +578 -71
  82. package/dist/types/data-structures/queue/queue.d.ts +451 -42
  83. package/dist/types/data-structures/stack/stack.d.ts +374 -32
  84. package/dist/types/data-structures/trie/trie.d.ts +458 -48
  85. package/dist/types/interfaces/graph.d.ts +1 -1
  86. package/dist/types/types/common.d.ts +2 -2
  87. package/dist/types/types/data-structures/binary-tree/segment-tree.d.ts +1 -1
  88. package/dist/types/types/data-structures/heap/heap.d.ts +1 -0
  89. package/dist/types/types/data-structures/linked-list/skip-linked-list.d.ts +1 -4
  90. package/dist/types/types/data-structures/priority-queue/priority-queue.d.ts +1 -0
  91. package/dist/types/types/utils/validate-type.d.ts +4 -4
  92. package/dist/umd/data-structure-typed.js +32432 -10808
  93. package/dist/umd/data-structure-typed.min.js +10 -4
  94. package/docs-site-docusaurus/README.md +41 -0
  95. package/docs-site-docusaurus/docs/api/README.md +52 -0
  96. package/docs-site-docusaurus/docs/api/classes/AVLTree.md +6130 -0
  97. package/docs-site-docusaurus/docs/api/classes/AVLTreeNode.md +282 -0
  98. package/docs-site-docusaurus/docs/api/classes/AbstractGraph.md +2266 -0
  99. package/docs-site-docusaurus/docs/api/classes/BST.md +5831 -0
  100. package/docs-site-docusaurus/docs/api/classes/BSTNode.md +333 -0
  101. package/docs-site-docusaurus/docs/api/classes/BinaryIndexedTree.md +455 -0
  102. package/docs-site-docusaurus/docs/api/classes/BinaryTree.md +4647 -0
  103. package/docs-site-docusaurus/docs/api/classes/BinaryTreeNode.md +331 -0
  104. package/docs-site-docusaurus/docs/api/classes/Deque.md +2767 -0
  105. package/docs-site-docusaurus/docs/api/classes/DirectedGraph.md +2999 -0
  106. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedList.md +2685 -0
  107. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedListNode.md +221 -0
  108. package/docs-site-docusaurus/docs/api/classes/FibonacciHeap.md +253 -0
  109. package/docs-site-docusaurus/docs/api/classes/FibonacciHeapNode.md +21 -0
  110. package/docs-site-docusaurus/docs/api/classes/HashMap.md +1333 -0
  111. package/docs-site-docusaurus/docs/api/classes/Heap.md +1881 -0
  112. package/docs-site-docusaurus/docs/api/classes/IterableElementBase.md +800 -0
  113. package/docs-site-docusaurus/docs/api/classes/IterableEntryBase.md +644 -0
  114. package/docs-site-docusaurus/docs/api/classes/LinearBase.md +1632 -0
  115. package/docs-site-docusaurus/docs/api/classes/LinearLinkedBase.md +1853 -0
  116. package/docs-site-docusaurus/docs/api/classes/LinkedHashMap.md +1108 -0
  117. package/docs-site-docusaurus/docs/api/classes/LinkedListNode.md +156 -0
  118. package/docs-site-docusaurus/docs/api/classes/LinkedListQueue.md +2824 -0
  119. package/docs-site-docusaurus/docs/api/classes/MapGraph.md +2929 -0
  120. package/docs-site-docusaurus/docs/api/classes/Matrix.md +1026 -0
  121. package/docs-site-docusaurus/docs/api/classes/MaxHeap.md +1866 -0
  122. package/docs-site-docusaurus/docs/api/classes/MaxPriorityQueue.md +1883 -0
  123. package/docs-site-docusaurus/docs/api/classes/MinHeap.md +1879 -0
  124. package/docs-site-docusaurus/docs/api/classes/MinPriorityQueue.md +1882 -0
  125. package/docs-site-docusaurus/docs/api/classes/Navigator.md +109 -0
  126. package/docs-site-docusaurus/docs/api/classes/PriorityQueue.md +1839 -0
  127. package/docs-site-docusaurus/docs/api/classes/Queue.md +2244 -0
  128. package/docs-site-docusaurus/docs/api/classes/RedBlackTree.md +6374 -0
  129. package/docs-site-docusaurus/docs/api/classes/SegmentTree.md +372 -0
  130. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedList.md +2897 -0
  131. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedListNode.md +169 -0
  132. package/docs-site-docusaurus/docs/api/classes/SkipList.md +1229 -0
  133. package/docs-site-docusaurus/docs/api/classes/Stack.md +1573 -0
  134. package/docs-site-docusaurus/docs/api/classes/TreeMap.md +1257 -0
  135. package/docs-site-docusaurus/docs/api/classes/TreeMultiMap.md +1475 -0
  136. package/docs-site-docusaurus/docs/api/classes/TreeSet.md +1117 -0
  137. package/docs-site-docusaurus/docs/api/classes/Trie.md +1708 -0
  138. package/docs-site-docusaurus/docs/api/classes/TrieNode.md +199 -0
  139. package/docs-site-docusaurus/docs/api/classes/UndirectedGraph.md +2979 -0
  140. package/docs-site-docusaurus/docs/guide/_category_.json +6 -0
  141. package/docs-site-docusaurus/docs/guide/architecture.md +613 -0
  142. package/docs-site-docusaurus/docs/guide/concepts.md +420 -0
  143. package/docs-site-docusaurus/docs/guide/guides.md +611 -0
  144. package/docs-site-docusaurus/docs/guide/installation.md +60 -0
  145. package/docs-site-docusaurus/docs/guide/integrations.md +823 -0
  146. package/docs-site-docusaurus/docs/guide/overview.md +638 -0
  147. package/docs-site-docusaurus/docs/guide/performance.md +833 -0
  148. package/docs-site-docusaurus/docs/guide/quick-start.md +73 -0
  149. package/docs-site-docusaurus/docusaurus.config.ts +159 -0
  150. package/docs-site-docusaurus/fix-mdx-generics.mjs +75 -0
  151. package/docs-site-docusaurus/package-lock.json +18667 -0
  152. package/docs-site-docusaurus/package.json +50 -0
  153. package/docs-site-docusaurus/prefix-class-to-methods.mjs +48 -0
  154. package/docs-site-docusaurus/sidebars.ts +23 -0
  155. package/docs-site-docusaurus/sort-protected.mjs +87 -0
  156. package/docs-site-docusaurus/src/css/custom.css +96 -0
  157. package/docs-site-docusaurus/src/pages/index.module.css +13 -0
  158. package/docs-site-docusaurus/src/pages/index.tsx +71 -0
  159. package/docs-site-docusaurus/src/pages/markdown-page.md +7 -0
  160. package/docs-site-docusaurus/src/theme/TOCItems/index.tsx +34 -0
  161. package/docs-site-docusaurus/static/.nojekyll +0 -0
  162. package/docs-site-docusaurus/static/img/docusaurus-social-card.jpg +0 -0
  163. package/docs-site-docusaurus/static/img/docusaurus.png +0 -0
  164. package/docs-site-docusaurus/static/img/favicon.ico +0 -0
  165. package/docs-site-docusaurus/static/img/favicon.png +0 -0
  166. package/docs-site-docusaurus/static/img/logo-180.png +0 -0
  167. package/docs-site-docusaurus/static/img/logo.jpg +0 -0
  168. package/docs-site-docusaurus/static/img/logo.png +0 -0
  169. package/docs-site-docusaurus/static/img/logo.svg +1 -0
  170. package/docs-site-docusaurus/static/img/og-image.png +0 -0
  171. package/docs-site-docusaurus/static/img/undraw_docusaurus_mountain.svg +171 -0
  172. package/docs-site-docusaurus/static/img/undraw_docusaurus_react.svg +170 -0
  173. package/docs-site-docusaurus/static/img/undraw_docusaurus_tree.svg +40 -0
  174. package/docs-site-docusaurus/static/robots.txt +4 -0
  175. package/docs-site-docusaurus/typedoc.json +23 -0
  176. package/package.json +109 -12
  177. package/src/data-structures/base/index.ts +1 -0
  178. package/src/data-structures/base/iterable-element-base.ts +4 -5
  179. package/src/data-structures/base/iterable-entry-base.ts +8 -8
  180. package/src/data-structures/base/linear-base.ts +3 -3
  181. package/src/data-structures/binary-tree/avl-tree.ts +386 -51
  182. package/src/data-structures/binary-tree/binary-indexed-tree.ts +596 -247
  183. package/src/data-structures/binary-tree/binary-tree.ts +956 -81
  184. package/src/data-structures/binary-tree/bst.ts +840 -35
  185. package/src/data-structures/binary-tree/red-black-tree.ts +689 -97
  186. package/src/data-structures/binary-tree/segment-tree.ts +498 -249
  187. package/src/data-structures/binary-tree/tree-map.ts +3784 -7
  188. package/src/data-structures/binary-tree/tree-multi-map.ts +3614 -211
  189. package/src/data-structures/binary-tree/tree-multi-set.ts +2874 -65
  190. package/src/data-structures/binary-tree/tree-set.ts +3531 -10
  191. package/src/data-structures/graph/abstract-graph.ts +4 -4
  192. package/src/data-structures/graph/directed-graph.ts +429 -47
  193. package/src/data-structures/graph/map-graph.ts +59 -1
  194. package/src/data-structures/graph/undirected-graph.ts +393 -59
  195. package/src/data-structures/hash/hash-map.ts +476 -92
  196. package/src/data-structures/heap/heap.ts +581 -99
  197. package/src/data-structures/heap/max-heap.ts +46 -0
  198. package/src/data-structures/heap/min-heap.ts +59 -0
  199. package/src/data-structures/linked-list/doubly-linked-list.ts +646 -47
  200. package/src/data-structures/linked-list/singly-linked-list.ts +596 -68
  201. package/src/data-structures/linked-list/skip-linked-list.ts +1067 -90
  202. package/src/data-structures/matrix/matrix.ts +584 -12
  203. package/src/data-structures/priority-queue/max-priority-queue.ts +57 -0
  204. package/src/data-structures/priority-queue/min-priority-queue.ts +60 -0
  205. package/src/data-structures/priority-queue/priority-queue.ts +60 -0
  206. package/src/data-structures/queue/deque.ts +592 -70
  207. package/src/data-structures/queue/queue.ts +463 -42
  208. package/src/data-structures/stack/stack.ts +384 -32
  209. package/src/data-structures/trie/trie.ts +470 -48
  210. package/src/interfaces/graph.ts +1 -1
  211. package/src/types/common.ts +2 -2
  212. package/src/types/data-structures/binary-tree/segment-tree.ts +1 -1
  213. package/src/types/data-structures/heap/heap.ts +1 -0
  214. package/src/types/data-structures/linked-list/skip-linked-list.ts +2 -1
  215. package/src/types/data-structures/priority-queue/priority-queue.ts +1 -0
  216. package/src/types/utils/validate-type.ts +4 -4
  217. package/vercel.json +6 -0
  218. package/dist/leetcode/avl-tree-counter.mjs +0 -2957
  219. package/dist/leetcode/avl-tree-multi-map.mjs +0 -2889
  220. package/dist/leetcode/avl-tree.mjs +0 -2720
  221. package/dist/leetcode/binary-tree.mjs +0 -1594
  222. package/dist/leetcode/bst.mjs +0 -2398
  223. package/dist/leetcode/deque.mjs +0 -683
  224. package/dist/leetcode/directed-graph.mjs +0 -1733
  225. package/dist/leetcode/doubly-linked-list.mjs +0 -709
  226. package/dist/leetcode/hash-map.mjs +0 -493
  227. package/dist/leetcode/heap.mjs +0 -542
  228. package/dist/leetcode/max-heap.mjs +0 -375
  229. package/dist/leetcode/max-priority-queue.mjs +0 -383
  230. package/dist/leetcode/min-heap.mjs +0 -363
  231. package/dist/leetcode/min-priority-queue.mjs +0 -371
  232. package/dist/leetcode/priority-queue.mjs +0 -363
  233. package/dist/leetcode/queue.mjs +0 -943
  234. package/dist/leetcode/red-black-tree.mjs +0 -2765
  235. package/dist/leetcode/singly-linked-list.mjs +0 -754
  236. package/dist/leetcode/stack.mjs +0 -217
  237. package/dist/leetcode/tree-counter.mjs +0 -3039
  238. package/dist/leetcode/tree-multi-map.mjs +0 -2913
  239. package/dist/leetcode/trie.mjs +0 -413
  240. package/dist/leetcode/undirected-graph.mjs +0 -1650
@@ -0,0 +1,347 @@
1
+ import {
2
+ BaseTransition,
3
+ BaseTransitionPropsValidators,
4
+ Comment,
5
+ DeprecationTypes,
6
+ EffectScope,
7
+ ErrorCodes,
8
+ ErrorTypeStrings,
9
+ Fragment,
10
+ KeepAlive,
11
+ ReactiveEffect,
12
+ Static,
13
+ Suspense,
14
+ Teleport,
15
+ Text,
16
+ TrackOpTypes,
17
+ Transition,
18
+ TransitionGroup,
19
+ TriggerOpTypes,
20
+ VueElement,
21
+ assertNumber,
22
+ callWithAsyncErrorHandling,
23
+ callWithErrorHandling,
24
+ camelize,
25
+ capitalize,
26
+ cloneVNode,
27
+ compatUtils,
28
+ compile,
29
+ computed,
30
+ createApp,
31
+ createBaseVNode,
32
+ createBlock,
33
+ createCommentVNode,
34
+ createElementBlock,
35
+ createHydrationRenderer,
36
+ createPropsRestProxy,
37
+ createRenderer,
38
+ createSSRApp,
39
+ createSlots,
40
+ createStaticVNode,
41
+ createTextVNode,
42
+ createVNode,
43
+ customRef,
44
+ defineAsyncComponent,
45
+ defineComponent,
46
+ defineCustomElement,
47
+ defineEmits,
48
+ defineExpose,
49
+ defineModel,
50
+ defineOptions,
51
+ defineProps,
52
+ defineSSRCustomElement,
53
+ defineSlots,
54
+ devtools,
55
+ effect,
56
+ effectScope,
57
+ getCurrentInstance,
58
+ getCurrentScope,
59
+ getCurrentWatcher,
60
+ getTransitionRawChildren,
61
+ guardReactiveProps,
62
+ h,
63
+ handleError,
64
+ hasInjectionContext,
65
+ hydrate,
66
+ hydrateOnIdle,
67
+ hydrateOnInteraction,
68
+ hydrateOnMediaQuery,
69
+ hydrateOnVisible,
70
+ initCustomFormatter,
71
+ initDirectivesForSSR,
72
+ inject,
73
+ isMemoSame,
74
+ isProxy,
75
+ isReactive,
76
+ isReadonly,
77
+ isRef,
78
+ isRuntimeOnly,
79
+ isShallow,
80
+ isVNode,
81
+ markRaw,
82
+ mergeDefaults,
83
+ mergeModels,
84
+ mergeProps,
85
+ nextTick,
86
+ nodeOps,
87
+ normalizeClass,
88
+ normalizeProps,
89
+ normalizeStyle,
90
+ onActivated,
91
+ onBeforeMount,
92
+ onBeforeUnmount,
93
+ onBeforeUpdate,
94
+ onDeactivated,
95
+ onErrorCaptured,
96
+ onMounted,
97
+ onRenderTracked,
98
+ onRenderTriggered,
99
+ onScopeDispose,
100
+ onServerPrefetch,
101
+ onUnmounted,
102
+ onUpdated,
103
+ onWatcherCleanup,
104
+ openBlock,
105
+ patchProp,
106
+ popScopeId,
107
+ provide,
108
+ proxyRefs,
109
+ pushScopeId,
110
+ queuePostFlushCb,
111
+ reactive,
112
+ readonly,
113
+ ref,
114
+ registerRuntimeCompiler,
115
+ render,
116
+ renderList,
117
+ renderSlot,
118
+ resolveComponent,
119
+ resolveDirective,
120
+ resolveDynamicComponent,
121
+ resolveFilter,
122
+ resolveTransitionHooks,
123
+ setBlockTracking,
124
+ setDevtoolsHook,
125
+ setTransitionHooks,
126
+ shallowReactive,
127
+ shallowReadonly,
128
+ shallowRef,
129
+ ssrContextKey,
130
+ ssrUtils,
131
+ stop,
132
+ toDisplayString,
133
+ toHandlerKey,
134
+ toHandlers,
135
+ toRaw,
136
+ toRef,
137
+ toRefs,
138
+ toValue,
139
+ transformVNodeArgs,
140
+ triggerRef,
141
+ unref,
142
+ useAttrs,
143
+ useCssModule,
144
+ useCssVars,
145
+ useHost,
146
+ useId,
147
+ useModel,
148
+ useSSRContext,
149
+ useShadowRoot,
150
+ useSlots,
151
+ useTemplateRef,
152
+ useTransitionState,
153
+ vModelCheckbox,
154
+ vModelDynamic,
155
+ vModelRadio,
156
+ vModelSelect,
157
+ vModelText,
158
+ vShow,
159
+ version,
160
+ warn,
161
+ watch,
162
+ watchEffect,
163
+ watchPostEffect,
164
+ watchSyncEffect,
165
+ withAsyncContext,
166
+ withCtx,
167
+ withDefaults,
168
+ withDirectives,
169
+ withKeys,
170
+ withMemo,
171
+ withModifiers,
172
+ withScopeId
173
+ } from "./chunk-7OIKW5WK.js";
174
+ export {
175
+ BaseTransition,
176
+ BaseTransitionPropsValidators,
177
+ Comment,
178
+ DeprecationTypes,
179
+ EffectScope,
180
+ ErrorCodes,
181
+ ErrorTypeStrings,
182
+ Fragment,
183
+ KeepAlive,
184
+ ReactiveEffect,
185
+ Static,
186
+ Suspense,
187
+ Teleport,
188
+ Text,
189
+ TrackOpTypes,
190
+ Transition,
191
+ TransitionGroup,
192
+ TriggerOpTypes,
193
+ VueElement,
194
+ assertNumber,
195
+ callWithAsyncErrorHandling,
196
+ callWithErrorHandling,
197
+ camelize,
198
+ capitalize,
199
+ cloneVNode,
200
+ compatUtils,
201
+ compile,
202
+ computed,
203
+ createApp,
204
+ createBlock,
205
+ createCommentVNode,
206
+ createElementBlock,
207
+ createBaseVNode as createElementVNode,
208
+ createHydrationRenderer,
209
+ createPropsRestProxy,
210
+ createRenderer,
211
+ createSSRApp,
212
+ createSlots,
213
+ createStaticVNode,
214
+ createTextVNode,
215
+ createVNode,
216
+ customRef,
217
+ defineAsyncComponent,
218
+ defineComponent,
219
+ defineCustomElement,
220
+ defineEmits,
221
+ defineExpose,
222
+ defineModel,
223
+ defineOptions,
224
+ defineProps,
225
+ defineSSRCustomElement,
226
+ defineSlots,
227
+ devtools,
228
+ effect,
229
+ effectScope,
230
+ getCurrentInstance,
231
+ getCurrentScope,
232
+ getCurrentWatcher,
233
+ getTransitionRawChildren,
234
+ guardReactiveProps,
235
+ h,
236
+ handleError,
237
+ hasInjectionContext,
238
+ hydrate,
239
+ hydrateOnIdle,
240
+ hydrateOnInteraction,
241
+ hydrateOnMediaQuery,
242
+ hydrateOnVisible,
243
+ initCustomFormatter,
244
+ initDirectivesForSSR,
245
+ inject,
246
+ isMemoSame,
247
+ isProxy,
248
+ isReactive,
249
+ isReadonly,
250
+ isRef,
251
+ isRuntimeOnly,
252
+ isShallow,
253
+ isVNode,
254
+ markRaw,
255
+ mergeDefaults,
256
+ mergeModels,
257
+ mergeProps,
258
+ nextTick,
259
+ nodeOps,
260
+ normalizeClass,
261
+ normalizeProps,
262
+ normalizeStyle,
263
+ onActivated,
264
+ onBeforeMount,
265
+ onBeforeUnmount,
266
+ onBeforeUpdate,
267
+ onDeactivated,
268
+ onErrorCaptured,
269
+ onMounted,
270
+ onRenderTracked,
271
+ onRenderTriggered,
272
+ onScopeDispose,
273
+ onServerPrefetch,
274
+ onUnmounted,
275
+ onUpdated,
276
+ onWatcherCleanup,
277
+ openBlock,
278
+ patchProp,
279
+ popScopeId,
280
+ provide,
281
+ proxyRefs,
282
+ pushScopeId,
283
+ queuePostFlushCb,
284
+ reactive,
285
+ readonly,
286
+ ref,
287
+ registerRuntimeCompiler,
288
+ render,
289
+ renderList,
290
+ renderSlot,
291
+ resolveComponent,
292
+ resolveDirective,
293
+ resolveDynamicComponent,
294
+ resolveFilter,
295
+ resolveTransitionHooks,
296
+ setBlockTracking,
297
+ setDevtoolsHook,
298
+ setTransitionHooks,
299
+ shallowReactive,
300
+ shallowReadonly,
301
+ shallowRef,
302
+ ssrContextKey,
303
+ ssrUtils,
304
+ stop,
305
+ toDisplayString,
306
+ toHandlerKey,
307
+ toHandlers,
308
+ toRaw,
309
+ toRef,
310
+ toRefs,
311
+ toValue,
312
+ transformVNodeArgs,
313
+ triggerRef,
314
+ unref,
315
+ useAttrs,
316
+ useCssModule,
317
+ useCssVars,
318
+ useHost,
319
+ useId,
320
+ useModel,
321
+ useSSRContext,
322
+ useShadowRoot,
323
+ useSlots,
324
+ useTemplateRef,
325
+ useTransitionState,
326
+ vModelCheckbox,
327
+ vModelDynamic,
328
+ vModelRadio,
329
+ vModelSelect,
330
+ vModelText,
331
+ vShow,
332
+ version,
333
+ warn,
334
+ watch,
335
+ watchEffect,
336
+ watchPostEffect,
337
+ watchSyncEffect,
338
+ withAsyncContext,
339
+ withCtx,
340
+ withDefaults,
341
+ withDirectives,
342
+ withKeys,
343
+ withMemo,
344
+ withModifiers,
345
+ withScopeId
346
+ };
347
+ //# sourceMappingURL=vue.js.map
package/CHANGELOG.md CHANGED
@@ -8,7 +8,9 @@ All notable changes to this project will be documented in this file.
8
8
  - [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
9
9
  - [`auto-changelog`](https://github.com/CookPete/auto-changelog)
10
10
 
11
- ## [v2.4.5](https://github.com/zrwusa/data-structure-typed/compare/v2.4.3...main) (upcoming)
11
+ ## [v2.5.1](https://github.com/zrwusa/data-structure-typed/compare/v2.5.0...main) (upcoming)
12
+
13
+ ## [v2.5.0](https://github.com/zrwusa/data-structure-typed/compare/v2.4.3...v2.5.0) (27 March 2026)
12
14
 
13
15
  ### Changes
14
16
 
package/README.md CHANGED
@@ -14,7 +14,7 @@ A comprehensive TypeScript data structures library with production-ready impleme
14
14
  ![NPM](https://img.shields.io/npm/l/data-structure-typed)
15
15
  ![npm](https://img.shields.io/npm/v/data-structure-typed)
16
16
 
17
- **📦 [Installation](#-installation) • 🎮 [Playground](#-playground) • ⚡ [Quick Start](#-quick-start-30-seconds) • 📖 [Docs](#-documentation) • 📋 [API](./docs/REFERENCE.md) • 💡 [Examples](./docs/GUIDES.md)**
17
+ **📦 [Installation](#-installation) • 🎮 [Playground](#-playground) • ⚡ [Quick Start](#-quick-start-30-seconds) • 📖 [Docs](#-documentation) • 📋 [API](https://data-structure-typed-docs.vercel.app/) • 💡 [Examples](./docs/GUIDES.md)**
18
18
 
19
19
  ---
20
20
 
@@ -45,12 +45,35 @@ yarn add data-structure-typed
45
45
  pnpm add data-structure-typed
46
46
  ```
47
47
 
48
+ ### Subpath Imports (Tree-Shaking Friendly)
49
+
50
+ Import only what you need — bundlers automatically tree-shake unused code:
51
+
52
+ ```typescript
53
+ // Full bundle — everything available
54
+ import { RedBlackTree, Deque, HashMap } from 'data-structure-typed';
55
+
56
+ // Subpath — smaller bundle, only loads the category you need
57
+ import { RedBlackTree, TreeMap, AVLTree } from 'data-structure-typed/binary-tree';
58
+ import { Deque, Queue } from 'data-structure-typed/queue';
59
+ import { HashMap } from 'data-structure-typed/hash';
60
+ import { Heap, MinHeap } from 'data-structure-typed/heap';
61
+ import { Trie } from 'data-structure-typed/trie';
62
+ import { Stack } from 'data-structure-typed/stack';
63
+ import { DoublyLinkedList } from 'data-structure-typed/linked-list';
64
+ import { DirectedGraph } from 'data-structure-typed/graph';
65
+ import { Matrix } from 'data-structure-typed/matrix';
66
+ import { MinPriorityQueue } from 'data-structure-typed/priority-queue';
67
+ ```
68
+
69
+ > **Note:** With `"sideEffects": false` and modern bundlers (Vite, Webpack 5, Rollup), even the full import `from 'data-structure-typed'` will tree-shake unused structures. Subpath imports give you explicit control and faster IDE autocomplete.
70
+
48
71
  ### Individual Packages
49
72
 
50
- Use only what you need:
73
+ Standalone packages are also available:
51
74
 
52
75
  ```bash
53
- npm i heap-typed deque-typed red-black-tree-typed
76
+ npm i avl-tree-typed bst-typed heap-typed
54
77
  ```
55
78
 
56
79
  ---
@@ -139,11 +162,11 @@ for (let i = 0; i < 100000; i++) {
139
162
  | DoublyLinkedList | 100k push | 5.70 | 2.40 | 5.70 | 1.90 |
140
163
  | SinglyLinkedList | 100K unshift & shift | 3.77 | 1958.39 | 4.80 | - |
141
164
  | PriorityQueue | 100K add | 4.00 | - | 1.05 | 4.96 |
142
- | TreeSet | 1M add | 962.76 | - | 462.00 | 640.31 |
143
- | TreeMap | 1M set | 996.95 | - | 512.00 | 624.82 |
144
- | TreeMultiSet | 1M add (TreeMultiSet expanded iteration) | 218.78 | - | 752.00 | - |
145
- | TreeMultiMap | 1M add (TreeMultiMap bucketed) | 387.80 | - | 731.00 | - |
146
- | RedBlackTree | 1M get | 108.02 | - | 52.97 | - |
165
+ | TreeSet | 1M add | 995.72 | - | 462.00 | 677.58 |
166
+ | TreeMap | 1M set | 978.72 | - | 512.00 | 623.23 |
167
+ | TreeMultiSet | 1M add (TreeMultiSet expanded iteration) | 217.73 | - | 752.00 | - |
168
+ | TreeMultiMap | 1M add (TreeMultiMap bucketed) | 366.19 | - | 731.00 | - |
169
+ | RedBlackTree | 1M get | 99.24 | - | 52.97 | - |
147
170
  | BST | 10K add randomly | 5.50 | - | - | - |
148
171
  | BinaryTree | 1K add randomly | 9.77 | - | - | - |
149
172
  | HashMap | 1M set | 146.17 | 144.83 | 76.26 | 94.16 |
@@ -232,27 +255,36 @@ const set = new Set(tree); // Set constructor
232
255
  ```typescript
233
256
  import { RedBlackTree } from 'data-structure-typed';
234
257
 
235
- const leaderboard = new RedBlackTree([
258
+ // Descending comparator highest scores first
259
+ const leaderboard = new RedBlackTree<number, string>([
236
260
  [100, 'Alice'],
237
261
  [85, 'Bob'],
238
262
  [92, 'Charlie']
239
- ]);
263
+ ], { comparator: (a, b) => b - a });
240
264
 
241
- // Get sorted scores (automatically maintained!)
242
- for (const [score, player] of leaderboard) {
243
- console.log(`${player}: ${score}`);
265
+ // Top-2 via lazy iterator — O(2 log n), no full traversal
266
+ const iter = leaderboard.entries();
267
+ for (let i = 0; i < 2; i++) {
268
+ const { value: [score, player] } = iter.next();
269
+ console.log(`${score}: ${player}`);
244
270
  }
245
- // Output:
246
- // Alice: 100
247
- // Charlie: 92
248
- // Bob: 85
271
+ // Output: 100: Alice → 92: Charlie
249
272
 
250
- // Update score
273
+ // Update score — O(log n)
251
274
  leaderboard.delete(85);
252
- leaderboard.set(95, 'Bob'); // O(log n)
275
+ leaderboard.set(95, 'Bob');
276
+
277
+ // Top-k — O(k log n), no array copy needed
278
+ const top3: [number, string][] = [];
279
+ let score = leaderboard.getLeftMost(); // highest score
280
+ while (score !== undefined && top3.length < 3) {
281
+ top3.push([score, leaderboard.get(score)!]);
282
+ score = leaderboard.higher(score); // next in tree order
283
+ }
253
284
 
254
- // Query top players
255
- const topPlayers = [...leaderboard.values()].reverse().slice(0, 3);
285
+ // Range query players scoring 90~100, O(log n + k)
286
+ const scores90to100 = leaderboard.rangeSearch([90, 100]);
287
+ // [100, 95, 92] — automatically respects tree order
256
288
  ```
257
289
 
258
290
  ### Task Queue (Scheduling)
@@ -294,8 +326,12 @@ queue.push(6); // Add to back: O(1)
294
326
  | **Stack** | Undo/redo, expression parsing | O(1) | [npm](https://www.npmjs.com/package/stack-typed) |
295
327
  | **LinkedList** | Dynamic sizing, no index shift | O(1)* | [npm](https://www.npmjs.com/package/linked-list-typed) |
296
328
  | **AVLTree** | Stricter balance than RB-Tree | O(log n) | [npm](https://www.npmjs.com/package/avl-tree-typed) |
329
+ | **SkipList** | Sorted KV, TreeMap alternative | O(log n) avg | — |
330
+ | **SegmentTree** | Range sum/min/max/custom queries | O(log n) | — |
331
+ | **BinaryIndexedTree** | Prefix sums, frequency counting | O(log n) | — |
332
+ | **Matrix** | 2D grid arithmetic | O(n²) add | — |
297
333
 
298
- 👉 [See all 20+ structures →](./docs/REFERENCE.md)
334
+ 👉 [See all 20+ structures →](./docs/OVERVIEW.md) | [Full API docs →](https://data-structure-typed-docs.vercel.app/)
299
335
 
300
336
  ---
301
337
 
@@ -306,8 +342,8 @@ queue.push(6); // Add to back: O(1)
306
342
  | Your Goal | Start Here | Next Steps |
307
343
  |---------------------------|-------------------------------------------|-----------------------------------------|
308
344
  | **Learn concepts** | [CONCEPTS.md](./docs/CONCEPTS.md) | [GUIDES.md](./docs/GUIDES.md) |
309
- | **Use in my project** | [GUIDES.md](./docs/GUIDES.md) | [REFERENCE.md](./docs/REFERENCE.md) |
310
- | **Look up API** | [REFERENCE.md](./docs/REFERENCE.md) | [PERFORMANCE.md](./docs/PERFORMANCE.md) |
345
+ | **Use in my project** | [GUIDES.md](./docs/GUIDES.md) | [OVERVIEW.md](./docs/OVERVIEW.md) |
346
+ | **Look up API** | [API Docs](https://data-structure-typed-docs.vercel.app/) | [PERFORMANCE.md](./docs/PERFORMANCE.md) |
311
347
  | **Performance questions** | [PERFORMANCE.md](./docs/PERFORMANCE.md) | [ARCHITECTURE.md](./docs/ARCHITECTURE.md) |
312
348
  | **Framework integration** | [INTEGRATIONS.md](./docs/INTEGRATIONS.md) | [GUIDES.md](./docs/GUIDES.md) |
313
349
  | **Understand design** | [ARCHITECTURE.md](./docs/ARCHITECTURE.md) | [CONCEPTS.md](./docs/CONCEPTS.md) |
@@ -321,14 +357,19 @@ queue.push(6); // Add to back: O(1)
321
357
  - 5 Comparisons with Native JavaScript
322
358
  - Complete Decision Guide
323
359
 
324
- 2. **[REFERENCE.md](./docs/REFERENCE.md)** - Complete API & Data Structures
360
+ 2. **[API Docs](https://data-structure-typed-docs.vercel.app/)** - Full API Reference (TypeDoc)
361
+ - Complete method signatures, parameters, return types
362
+ - Real-world `@example` code for every method
363
+ - Inheritance hierarchy and type details
364
+
365
+ 3. **[OVERVIEW.md](./docs/OVERVIEW.md)** - Data Structures Overview
325
366
  - Quick Reference Table
326
367
  - All 20+ Structures with Examples
327
368
  - CRUD Operations
328
369
  - Common Methods
329
370
  - TypeScript Support
330
371
 
331
- 3. **[ARCHITECTURE.md](./docs/ARCHITECTURE.md)** - Design & Implementation
372
+ 4. **[ARCHITECTURE.md](./docs/ARCHITECTURE.md)** - Design & Implementation
332
373
  - Design Philosophy & Principles
333
374
  - 3 Pain Points Solved
334
375
  - Why Deque is 484x Faster
@@ -336,20 +377,20 @@ queue.push(6); // Add to back: O(1)
336
377
  - Self-Balancing Strategy
337
378
  - V8 JIT Optimizations
338
379
 
339
- 4. **[PERFORMANCE.md](./docs/PERFORMANCE.md)** - Benchmarks & Comparisons
380
+ 5. **[PERFORMANCE.md](./docs/PERFORMANCE.md)** - Benchmarks & Comparisons
340
381
  - Performance Summary
341
382
  - 3 Real-World Scenarios
342
383
  - Detailed Benchmarks
343
384
  - When to Use What
344
385
  - Optimization Tips
345
386
 
346
- 5. **[GUIDES.md](./docs/GUIDES.md)** - Real-World Examples
387
+ 6. **[GUIDES.md](./docs/GUIDES.md)** - Real-World Examples
347
388
  - 4 Design Patterns
348
389
  - 5 Production Code Examples
349
390
  - Common Mistakes
350
391
  - Best Practices
351
392
 
352
- 6. **[INTEGRATIONS.md](./docs/INTEGRATIONS.md)** - Framework Integration
393
+ 7. **[INTEGRATIONS.md](./docs/INTEGRATIONS.md)** - Framework Integration
353
394
  - React Integration (State Management, Leaderboard)
354
395
  - Express Integration (LRU Cache, Rate Limiting)
355
396
  - Nest.js Integration (Ranking Service, Task Queue)
@@ -549,6 +590,12 @@ Need prefix/text matching?
549
590
  Need graph operations?
550
591
  → DirectedGraph/UndirectedGraph
551
592
 
593
+ Need range queries on array (sum/min/max)?
594
+ → SegmentTree (any merge op) or BinaryIndexedTree (prefix sums only)
595
+
596
+ Need sorted key-value with same API as TreeMap?
597
+ → SkipList (O(log n) avg, probabilistic balancing)
598
+
552
599
  Otherwise?
553
600
  → Use Array (simplest case)
554
601
  ```
@@ -573,7 +620,7 @@ MIT
573
620
  README.md (this file)
574
621
  docs/
575
622
  ├── CONCEPTS.md (theory & fundamentals)
576
- ├── REFERENCE.md (API documentation)
623
+ ├── OVERVIEW.md (Data structures overview)
577
624
  ├── ARCHITECTURE.md (design principles)
578
625
  ├── PERFORMANCE.md (benchmarks)
579
626
  ├── GUIDES.md (real-world examples)
@@ -590,7 +637,7 @@ docs/
590
637
 
591
638
  **Want to build?** → [GUIDES.md](./docs/GUIDES.md)
592
639
 
593
- **Need API?** → [REFERENCE.md](./docs/REFERENCE.md)
640
+ **Need API?** → [API Docs](https://data-structure-typed-docs.vercel.app/) | [Overview](./docs/OVERVIEW.md)
594
641
 
595
642
  **Curious about performance?** → [PERFORMANCE.md](./docs/PERFORMANCE.md)
596
643