linked-list-typed 1.39.2 → 1.39.3

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 (45) hide show
  1. package/dist/data-structures/binary-tree/avl-tree.d.ts +10 -10
  2. package/dist/data-structures/binary-tree/avl-tree.js +4 -4
  3. package/dist/data-structures/binary-tree/binary-tree.d.ts +49 -108
  4. package/dist/data-structures/binary-tree/binary-tree.js +27 -27
  5. package/dist/data-structures/binary-tree/bst.d.ts +22 -22
  6. package/dist/data-structures/binary-tree/bst.js +12 -12
  7. package/dist/data-structures/binary-tree/rb-tree.d.ts +3 -3
  8. package/dist/data-structures/binary-tree/tree-multiset.d.ts +14 -14
  9. package/dist/data-structures/binary-tree/tree-multiset.js +7 -7
  10. package/dist/interfaces/binary-tree.d.ts +4 -4
  11. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +1 -1
  12. package/dist/types/data-structures/binary-tree/bst.d.ts +2 -2
  13. package/dist/types/helpers.d.ts +1 -1
  14. package/package.json +1 -1
  15. package/src/data-structures/binary-tree/avl-tree.ts +13 -12
  16. package/src/data-structures/binary-tree/binary-indexed-tree.ts +1 -1
  17. package/src/data-structures/binary-tree/binary-tree.ts +130 -60
  18. package/src/data-structures/binary-tree/bst.ts +31 -32
  19. package/src/data-structures/binary-tree/rb-tree.ts +7 -6
  20. package/src/data-structures/binary-tree/tree-multiset.ts +16 -15
  21. package/src/data-structures/graph/abstract-graph.ts +11 -10
  22. package/src/data-structures/graph/directed-graph.ts +2 -1
  23. package/src/data-structures/graph/undirected-graph.ts +5 -4
  24. package/src/data-structures/hash/hash-map.ts +1 -1
  25. package/src/data-structures/hash/tree-map.ts +1 -2
  26. package/src/data-structures/hash/tree-set.ts +1 -2
  27. package/src/data-structures/heap/heap.ts +2 -2
  28. package/src/data-structures/heap/max-heap.ts +1 -1
  29. package/src/data-structures/heap/min-heap.ts +1 -1
  30. package/src/data-structures/linked-list/doubly-linked-list.ts +1 -1
  31. package/src/data-structures/linked-list/singly-linked-list.ts +1 -1
  32. package/src/data-structures/matrix/matrix.ts +1 -1
  33. package/src/data-structures/matrix/vector2d.ts +1 -2
  34. package/src/data-structures/priority-queue/max-priority-queue.ts +1 -1
  35. package/src/data-structures/priority-queue/min-priority-queue.ts +1 -1
  36. package/src/data-structures/priority-queue/priority-queue.ts +1 -1
  37. package/src/data-structures/queue/deque.ts +4 -5
  38. package/src/data-structures/queue/queue.ts +1 -1
  39. package/src/interfaces/binary-tree.ts +4 -4
  40. package/src/types/data-structures/binary-tree/binary-tree.ts +1 -1
  41. package/src/types/data-structures/binary-tree/bst.ts +2 -2
  42. package/src/types/data-structures/matrix/navigator.ts +1 -1
  43. package/src/types/helpers.ts +1 -1
  44. package/src/types/utils/utils.ts +1 -1
  45. package/src/types/utils/validate-type.ts +2 -2
@@ -1,7 +1,7 @@
1
1
  import {BSTNode} from '../../../data-structures';
2
- import type {BinaryTreeNodeKey, BinaryTreeOptions} from './binary-tree';
2
+ import type {BTNKey, BinaryTreeOptions} from './binary-tree';
3
3
 
4
- export type BSTComparator = (a: BinaryTreeNodeKey, b: BinaryTreeNodeKey) => number;
4
+ export type BSTComparator = (a: BTNKey, b: BTNKey) => number;
5
5
 
6
6
  // prettier-ignore
7
7
  export type BSTNodeNested<T> = BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -1,6 +1,6 @@
1
1
  export type Direction = 'up' | 'right' | 'down' | 'left';
2
2
 
3
- export type Turning = { [key in Direction]: Direction };
3
+ export type Turning = {[key in Direction]: Direction};
4
4
 
5
5
  export type NavigatorParams<T = any> = {
6
6
  matrix: T[][];
@@ -2,7 +2,7 @@ export type Comparator<T> = (a: T, b: T) => number;
2
2
 
3
3
  export type DFSOrderPattern = 'pre' | 'in' | 'post';
4
4
 
5
- export type OneParamCallback<N, D = any> = (node: N) => D;
5
+ export type BTNCallback<N, D = any> = (node: N) => D;
6
6
 
7
7
  export enum CP {
8
8
  lt = 'lt',
@@ -1,5 +1,5 @@
1
1
  export type ToThunkFn = () => ReturnType<TrlFn>;
2
- export type Thunk = () => ReturnType<ToThunkFn> & { __THUNK__: symbol };
2
+ export type Thunk = () => ReturnType<ToThunkFn> & {__THUNK__: symbol};
3
3
  export type TrlFn = (...args: any[]) => any;
4
4
  export type TrlAsyncFn = (...args: any[]) => any;
5
5
 
@@ -1,6 +1,6 @@
1
- export type KeyValueObject = { [key: string]: any };
1
+ export type KeyValueObject = {[key: string]: any};
2
2
 
3
- export type KeyValueObjectWithKey = { [key: string]: any; key: string | number | symbol };
3
+ export type KeyValueObjectWithKey = {[key: string]: any; key: string | number | symbol};
4
4
 
5
5
  export type NonNumberNonObjectButDefined = string | boolean | symbol | null;
6
6