Commit graph

24 commits

Author SHA1 Message Date
Revone
fc0d157295 refactor: Test coverage increased to 95.63%.
Upgraded all dependencies.
Added a toVisual method while retaining the print method.
Replaced all short-circuit evaluations with logical expressions.
2024-10-30 15:30:28 +13:00
Revone
7e45aaf609 style: Prettier version updated. Code style adhered to Prettier strictly. 2024-08-27 10:56:04 +12: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
9915ce9a0d Refactor: Rename _defaultOneParamCallback to _DEFAULT_CALLBACK. Adopt early return code style in the ensureNode method. Rename some internal recursive method names. 2024-01-15 12:12:01 +08:00
Revone
c3db558607 Refactor: The default callback function now supports returning values for null and undefined nodes with undefined keys. The deleteVertex method in AbstractGraph has been made abstract. Unnecessary magnitude variables have been removed from the magnitude function. fix: In directed and undirected graphs, the deleteVertex method now removes edges from adjacent nodes when deleting a vertex. 2023-12-21 10:01:04 +08:00
Revone
dd2701dab7 style: reformated codebase 2023-11-16 10:14:14 +08:00
Revone
8f1f6d6f52 style: Try to synchronize Prettier with the coding style of the IDE. 2023-11-13 22:27:29 +08:00
Revone
1064ad4a58 style: reformat code with IDE 2023-11-13 13:07:28 +08:00
Revone
bd2ecc5699 [benchmark] enriched the utils of performance test. enriched the performance test cases 2023-11-04 01:21:30 +08:00
Revone
4614773413 [binary-tree] Merge the operation of modifying the value into the insert query process to improve performance. [benchmark] Enhance performance test cases and move existing performance tests from unit tests to the 'performance' section. Improve the benchmark test report. Refine the logic of the report generator. 2023-11-02 21:38:10 +08:00
Revone
121516f303 [core] Rename all 'val' variables to 'value'. 2023-10-30 20:27:08 +08:00
Revone
bf5b865e2c [binary-tree] bug fix#27 2023-10-30 11:14:41 +08:00
Revone
f87e682f26 [test] test coverage enriched to 90.37% 2023-10-29 21:52:27 +08:00
Revone
bd1720973a [test] Increase the test coverage to 89.51. 2023-10-28 23:54:27 +08:00
Revone
6c45f53f72 [heap, priority-queue, binary-indexed-tree] Heap and PriorityQueue constructors use a single object as a parameter for uniformity with the design of other data structures.
Binary Indexed Tree includes the getPrefixSum method.
2023-10-28 17:37:51 +08:00
Revone
f8e0607b25 [trie] The Trie's getWords method now offers an optional parameter to retrieve all words in case of an empty string input. 2023-10-28 15:50:42 +08:00
Revone
f90afe0b57 [binary-tree] The binary tree's BFS and level-order traversal results should be the same. However, for convenience, we provide an additional method called listLevels to display traversal results in levels. 2023-10-27 22:30:52 +08:00
Revone
8df45c5c52 [binary-tree] Dynamically infer traversal method return values based on callback function results. 2023-10-25 21:09:11 +08:00
Revone
e45854d3f4 [project] Optimize the build configuration to be compatible with both earlier and later versions of Node.js. Switch to using tsup for UMD module output. Format code using an IDE. 2023-10-25 15:51:50 +08:00
Revone
3983ab089c [binary-tree] Each method that traverses based on the root node can specify any node within the tree as the root node. 2023-10-23 22:36:49 +08:00
Revone
af7372ba30 [pkg] ready to publish v1.37.0 2023-10-22 00:00:22 +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
cb56b04af5 [test] big o estimate refined 2023-10-21 14:46:41 +08:00
Revone
961e4e5f8c [heap] fibonacci heap implemented. [test] big O estimate. [project] no-unused-vars config to warn 2023-10-21 01:59:10 +08:00