Revone
3028a78985
Refactor: Abandon the use of Comparable types as keys for the binary tree, as the '>', '>=', '<', '<=' operators are supported by the any type. The heap also adopts the same comparator as the binary tree.
2024-01-29 11:35:24 +08:00
Revone
02d71a23ba
Refactor: All binary tree data structures now support the toEntryFn for extracting key and value from raw data at once, avoiding users from having to traverse data multiple times, thus improving performance. Chore: Explicitly use the override keyword.
2024-01-26 18:20:15 +08:00
Revone
3c26538c2e
release: 1.51.8
2024-01-25 10:55:59 +08:00
Revone
1303aba070
refactor: Use Comparable type constraint for the key in the binary tree to improve comparator performance.
2024-01-24 18:38:34 +08:00
Revone
d57d6072c2
fix: Fix bug in BST.isBST to make it compatible with inverse BST.
...
refactor: Use KeyOrNodeOrEntry as the parameter type consistently in the binary tree data structure.
test: Remove unnecessary performance reports and refactor loop code to use single lines wherever possible.
2023-12-23 11:53:18 +08:00
Revone
dc6ef95f78
style: code base reformat
2023-12-21 10:26:45 +08:00
Revone
60a3154178
refactor: Differentiate between type imports and regular object imports.
2023-12-11 14:14:46 +08:00
Revone
1c8324147f
feat: The addMany method in binary tree data structures supports both addMany(keys, values) and addMany(entries).
2023-12-07 10:19:17 +08:00
Revone
1b1d5c6669
feat: The add method of the binary tree is compatible with the multi-parameter mode of add(key, value), and it is also compatible with the entry method.
2023-12-07 09:16:25 +08:00
Revone
8a24a6d7a4
refactor: The binary tree data structure supports custom types for keys
2023-12-04 21:58:41 +08:00
Revone
b099b759e8
refactor: The strategy of all binary tree data structures is to replace a node only when the same node is added.
2023-11-25 20:40:11 +08:00
Revone
18b895cb4c
refactor: The parameters for the add and addMany methods in all binary tree data structures have been changed to the entry style, and the first test has passed.
2023-11-25 14:38:32 +08:00
Revone
cd14ec79ec
refactor: Use a type BTNExemplar to simplify the method parameters of binary tree data structures.
2023-11-24 09:58:10 +08:00
Revone
4930f87bcd
feat: Add an 'elements' parameter to the constructors of all binary tree data structures to accept Iterable types.
2023-11-23 21:43:45 +08:00
Revone
a41e222481
feat: Implement forEach, filter, map, reduce, and [Symbol.iterator] methods for all binary tree data structures
2023-11-22 17:18:37 +08:00
Revone
dd2701dab7
style: reformated codebase
2023-11-16 10:14:14 +08:00
Revone
1064ad4a58
style: reformat code with IDE
2023-11-13 13:07:28 +08:00
Revone
28207b6d45
perf: Unified all APIs, all parameters that accept node types can also accept node keys as parameters.
2023-11-09 17:47:02 +08:00
Revone
8712bbd3c9
[core] All data structures have had their member variables access control optimized.
2023-10-31 11:15:39 +08:00
Revone
121516f303
[core] Rename all 'val' variables to 'value'.
2023-10-30 20:27:08 +08:00
Revone
fcec29f32c
[graph test] edge cases enriched
2023-10-30 20:08:25 +08:00
Revone
d44788bea9
[graph] Modify the data structure design of the graph to change the generics of Vertex and Edge to defaults, where it is possible to only pass the value types of Vertex and Edge for increased usability.
2023-10-30 18:27:58 +08:00
Revone
bf5b865e2c
[binary-tree] bug fix#27
2023-10-30 11:14:41 +08:00
Revone
bd1720973a
[test] Increase the test coverage to 89.51.
2023-10-28 23:54:27 +08:00
Revone
06dc8bdc4d
[binary-tree] Change the design so that when instantiating the BinaryTree data structure, there's no need to specify the node type; instead, use the second default generic parameter and its default value.
2023-10-27 18:04:31 +08:00
Revone
af23af911a
[binary-tree] renamed _loopType to _iterationType
2023-10-27 17:17:27 +08:00
Revone
f2d3be7574
[binary-tree] Translate the return value type inference for methods that take a callback function as a parameter.
2023-10-26 20:26:06 +08:00
Revone
a6329163f7
1. No need for dfsIterative; integrate it directly into the dfs method. 2. Allow for public configuration of setLoopType. 3. Replace subTreeAdd with subTreeForeach for improved clarity and flexibility; provide a callback for enhanced versatility. 4. Standardize the naming of certain methods and parameters.
2023-10-21 20:03:54 +08:00
Revone
9764f2a5c6
[binary-tree, graph] In order to optimize the design of Binary Trees, unnecessary abstract classe removed, while enforcing method constraints between base classes and subclasses through interfaces. For Graph, it is necessary to use an abstract class as the base class, and interface constraints should be applied. Any data structures that are not within the scope of the plan deleted.
2023-10-17 21:06:41 +08:00
Revone
4d01fa413e
[core] Clean up unnecessary redundancies in the interfaces and rectify any illogical interface definitions.
2023-10-11 20:21:20 +08:00
Revone
836927ab82
[core] To compile a CommonJS module in the "dist" directory into ES6 code. Fixing some missing bugs in overloaded methods.
2023-10-11 18:44:59 +08:00
Revone
31aa92e761
[binary-tree] Replace optional parameters with default values
2023-10-10 23:01:13 +08:00
Revone
8b8e781607
[core] Rename those legacy IDs that have not been updated to 'key'
2023-10-10 22:39:31 +08:00
Revone
f08819eb83
[core] In order to adhere to best practices, rename the DFS method and the BFS method as dfs and bfs.
2023-10-10 22:15:01 +08:00
Revone
ed1ecf541f
[binary-tree] unnecessary geters and setters removed
2023-10-10 21:56:55 +08:00
Revone
45c49c99bf
[core] renamed id to key
2023-10-10 19:55:52 +08:00
Revone
80675e2bbb
[BinaryTree] leftSum feature eliminated
2023-09-25 17:18:14 +08:00
Revone
96621c72e5
[RBTree] first commit of RBTree. [HashTable] first commit
2023-09-25 15:48:24 +08:00
Revone
ea8f993a4a
[prettier] bracket spacing false
2023-09-22 10:43:16 +08:00
Revone
b263262a46
[project] github workflow added. eslint added. formating code by using prettier.
2023-09-21 12:52:17 +08:00
Revone
95b44f439b
[project] ESLint applied
2023-09-20 11:39:24 +08:00
Revone
55704871b6
v1.3.1 published, new Queue implemented from SinglyLinkedList, and ArrayQueue implemented from Array
2023-09-18 22:04:39 +08:00
Revone
773c970667
Establish a unified code editor encoding standard by .editorconfig file.
2023-09-12 11:15:20 +08:00
Revone
450f051138
Optimize the overall codebase and directory structure.
2023-09-12 11:10:09 +08:00