Commit graph

27 commits

Author SHA1 Message Date
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