Revone
6428e0f228
fix: Bug fix #103 : Fixed an issue where all binary tree clone methods lost constructor parameters. Optimized variable names. Standardized access modifiers for binary tree member variables.
2024-10-30 20:52:23 +13:00
Revone
18fe006652
style: Remove unnecessary comments.
2024-10-21 21:34:51 +13:00
Revone
07dd75de70
test: The test cases have been added, though slightly tricky. The overall test coverage is currently at 93.27%.
2024-10-16 21:55:48 +13:00
Philipp Lentzen
b90da5cf82
docs(queue): fix mismatch between typings and jsdoc
2024-10-10 13:34:19 +02:00
Revone
7e45aaf609
style: Prettier version updated. Code style adhered to Prettier strictly.
2024-08-27 10:56:04 +12:00
Revone
ac1712ba04
feat: supports compact method to save memory. #91
2024-08-27 10:24:38 +12:00
Revone
3e91a97987
fix : #89 . Supports maxLen for max length of the Deque
2024-08-04 19:19:14 +12:00
Revone
1ae9e929b1
feat: Provide the toElementFn method during instantiation for the entire data structure series, allowing the mapping of raw data to the desired data type and direct insertion of data into the data structure to be completed within a single loop.
...
fix: Override the corresponding clone, filter, and map methods in the Heap and PriorityQueue data structures, ensuring the accurate return of the respective data structures. #84 fixed.
2024-02-01 21:05:10 +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
4747839d88
Refactor: Standardize addition and removal methods for all sequential data structures to push, pop, shift, unshift.
2024-01-09 12:04:50 +08:00
Revone
ba16f311c3
Refactor: Organize the access permissions of all member variables. Docs: Partial documentation for time and space complexity.
2024-01-05 15:37:28 +08:00
Revone
eaf8912746
docs: Verify the time and space complexity for each method.
...
feat: Add the cutRest method to Deque.
refactor: Update the cut method in Deque to support the isCutSelf parameter.
2024-01-04 16:28:17 +08:00
Revone
ecf4d6ad11
fix: Fix bug #71 .
...
feat: Define abstract methods through a base class to add clone and isEmpty methods to all data structures. Add delete and deleteAt methods to Deque, Queue, and Stack data structures.
refactor: Optimize the type definition N to NODE for alignment with the design of TREE.
2024-01-03 15:52:10 +08:00
Revone
58ea2cb3c3
docs: Complete all code comments.
2024-01-01 10:45:32 +08:00
Revone
831ad3bd98
refactor: rename method 'getAt' to 'at'
2023-12-30 20:36:11 +08:00
Revone
ff8f907192
feat: In the IterableEntryBase and IterableElementBase classes, add find, get, and has methods so that all inheriting data structures can have access to these methods. Also, override these methods in the necessary data structures as needed.
2023-12-30 18:44:24 +08:00
Revone
c28deb8d81
refactor: Rename exemplarToNode to keyValueOrEntryToNode. feat: Implement the clone method for all data structures.
2023-12-30 17:50:57 +08:00
Revone
34d4abd9e6
fix : #38 Removed includeNull parameter from traversal methods.
...
feat: Removed unnecessary methods isNotNodeInstance and subTreeTraverse.
refactor: Organized the overloads of traversal methods.
2023-12-29 11:15:19 +08:00
Revone
689aa0f57e
feat: Provide convenient option of the raw data processing function 'toEntry' in HashMap.options.
2023-12-25 20:24:41 +08:00
Revone
c949b5b741
refactor: Rearrange constructor parameters for all data structures, with the first parameter being the output and the second parameter being a configuration object. Make all configuration object properties optional.
...
fix: Provide optional parameters for inheritable data structures to facilitate inheritance. #64
2023-12-24 17:44:55 +08:00
Revone
dc6ef95f78
style: code base reformat
2023-12-21 10:26:45 +08:00
Revone
bbfa64fc64
fix: Fix the bug in the getCycles method. refactor: Rename some variables.
2023-12-19 12:15:44 +08:00
Revone
3e97e806ba
refactor: Unify the return types of all methods and align them with Java, extract the print and hasValue methods to base class. This will make the code more consistent and easier to understand.
2023-12-12 21:14:17 +08:00
Revone
e113a99b26
fix: bug fixed #58 , DirectedGraph.getCycles returns an inexisting cycle. feat: hasValue method for HashMap.
2023-12-12 09:57:30 +08:00
Revone
f0927e8b0a
docs: Wrote a feature description for each data structure. refactor: Standardize the import of all types and objects
2023-12-11 20:27:05 +08:00
Revone
60a3154178
refactor: Differentiate between type imports and regular object imports.
2023-12-11 14:14:46 +08:00
Revone
93201bddba
perf: The add method of BinaryTree doesn't need to check for existence first, it can detect and add in a single traversal. Feat: Discard the ObjectDeque data structure. test: Increased test coverage for Deque and Queue.
2023-12-08 19:54:13 +08:00
Revone
a02a9a94d2
refactor: Rewrite the lastKey method. The BinaryTree.add method filters out duplicate additions. Rename popLast and popFirst to pollLast and pollFirst.
2023-12-07 19:34:20 +08:00
Revone
7f5eb6cb70
refactor: Extract all methods such as 'some', 'every', 'entries', 'keys', 'values', 'forEach', 'reduce' into the base classes 'IterableElementBase' and 'IterablePairBase'.
2023-12-02 22:15:18 +08:00
Revone
86200435e8
refactor: In Stack data structures, only use 'undefined' and abandon the design where both 'null' and 'undefined' coexist.
2023-11-27 09:38:03 +08:00
Revone
8f9eb82bfd
feat: To support conversion between data structures, Heap, PriorityQueue, Queue, Deque, SinglyLinkedList, DoublyLinkedList, and Stack have all added an 'elements' parameter for initializing the elements of the data structure.
2023-11-23 18:40:30 +08:00
Revone
5cf88d098e
feat: All data structures except Graph have implemented *[Symbol.iterator], forEach, filter, map, reduce methods.
2023-11-23 13:19:13 +08:00
Revone
b4e89d9f72
refactor: Discard the unnecessary Iterator class in Deque and HashMap, and instead implement using Generators.
2023-11-19 21:09:44 +08:00
Revone
b089cf47b3
refactor: In the Deque data structure, abandon the Iterator class and implement using a Generator instead.
2023-11-19 20:48:53 +08:00
Revone
6f74397f8d
fix: Iterator supports function length or function size
2023-11-19 09:04:48 +08:00
Revone
5c6803b1a9
docs: Deque docs enriched, big o notations
2023-11-19 08:56:37 +08:00
Revone
a4a35731d2
fix: Deque delete param correctly used
2023-11-17 22:43:12 +08:00
Revone
2634c99388
feat: high-performance Deque implemented
2023-11-17 22:37:35 +08:00
Revone
d761e79e4d
fix: Bug fix for 'resize', 'insertAt', and 'deleteAt'.
2023-11-17 18:44:14 +08:00
Revone
e7be7b559d
feat: Implemented Deque independently and conducted performance tests, and eliminated the redundant data structure ArrayDeque. Add performance test cases for DoublyLinkedList.
2023-11-17 16:11:31 +08:00
Revone
be6ad5473b
style: Change ESLint configuration from error type to warning type. Format the code.
2023-11-16 11:55:40 +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
fd416c5d6e
docs: Almost all methods of data structures have added comments on time and space complexity.
2023-11-10 16:24:24 +08:00
Revone
c82190764e
[rbtree, binary-tree] Further testing of the Red-Black Tree is required. The 'get' method in BinaryTree should be renamed to 'getNode,' and an additional 'get' method should be added.
2023-11-01 13:48:01 +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
1ec5a19172
[core] Besides Binary Trees and Graphs, access control optimizations have been applied to member variables.
2023-10-31 10:34:41 +08:00
Revone
3009c14c24
[queue] Added some alias methods.
2023-10-31 09:03:06 +08:00
Revone
121516f303
[core] Rename all 'val' variables to 'value'.
2023-10-30 20:27:08 +08:00