Commit graph

  • 69f8e7de3d docs: Added example code for HashMap, Queue, and Stack. main Revone 2024-12-06 10:38:51 +1300
  • de0a2f1053 release: 2.0.0 Revone 2024-12-05 20:26:31 +1300
  • 9224252367 perf: Optimize the performance of indexOf, lastIndexOf, slice, and splice methods in Queue, Deque, SinglyLinkedList, and DoublyLinkedList. The performance is now satisfactory with a dataset of 1 million elements. Revone 2024-12-05 20:23:26 +1300
  • 4a522db1e3 feat: Added multiple methods to all linear data structures (Queue, Deque, DoublyLinkedList, SinglyLinkedList), including join, concat, sort, slice, lastIndexOf, findIndex, splice, reduceRight, and fill. Abstracted LinearBase and LinearLinkedBase classes to implement high-performance member methods tailored to different data types. Revone 2024-12-04 22:30:05 +1300
  • 731ef56e10 docs: Add an example code for a sliding window using Deque. Revone 2024-12-03 15:15:48 +1300
  • 17cfcbd66c feat: Change the size property of all queue-based data structures to length to align with JavaScript's Array. Revone 2024-12-03 13:53:51 +1300
  • d27784228b feat: Add maxLen configuration option to all queue-based data structures. docs: Add example code for Deque. Revone 2024-12-03 13:35:25 +1300
  • 670225e775 fix: Fix the issue where an extra array layer was processed for entries during TreeMultiMap instantiation. feat: Add support for configuration in TreeMultiMap and AVLTreeMultiMap. docs: Add example code for a game leaderboard using TreeMultiMap. Revone 2024-12-03 11:47:32 +1300
  • ae42526b91 release: v1.54.3 Revone 2024-12-02 20:36:27 +1300
  • a008a33a30 style: Utilize the built-in _dfs method across all binary tree data structures to optimize the search method. feat: The search and rangeSearch methods in binary trees now default to in-order traversal for producing ordered results. docs: Add sample code for AVLTree. Explicitly document method parameter types for all binary tree data structures. Revone 2024-12-02 20:35:46 +1300
  • b759eecf59 feat: Allow BinaryTree to support adding duplicate keys. docs: BinaryTree Revone 2024-12-02 14:32:43 +1300
  • a19080bb53 docs: playground project added Revone 2024-11-30 21:53:27 +1300
  • 116324610d docs: playground project added Revone 2024-11-30 21:50:45 +1300
  • dd27393049 fix: Remove export restrictions in package.json to enable ESModules to work properly. Revone 2024-11-30 19:29:37 +1300
  • 8b247456f5 release: v1.54.1 Revone 2024-11-30 13:34:05 +1300
  • cbda9c152b fix: Strictly implemented the IBinaryTree interface in TreeMultiMap and AVLTreeMultiMap, while passing the correct MV[] type. Revone 2024-11-30 13:27:07 +1300
  • b16559bc54 feat: Implemented correct TreeMultiMap and AVLTreeMultiMap. Removed support for Raw parameters in the add and delete methods, #115. fix: Reimplemented the original TreeMultiMap and AVLTreeMultiMap as two new data structures: TreeCounter and AVLTreeCounter, #108. style: Code cleanup, such as removing unnecessary comments. docs: Fixed some time complexity and space complexity. chore: Changed the ESModules build directory to the standard dist/ems. Revone 2024-11-30 13:16:46 +1300
  • 6dc64dbb53 fix: Discard the awkward type-safe implementation in the binary tree data structure where subclasses need to pass the node type and tree type back to the parent class. Revone 2024-11-28 19:37:51 +1300
  • 691fb62893 fix: #117 Revone 2024-11-25 20:18:20 +1300
  • 829403dc63 fix: Adjust all entry callback functions to the [key, value] order. Revone 2024-11-25 01:29:48 +1300
  • 1a1ea21444 fix: Adjust type safety for the map method of all binary trees, ensuring it no longer returns the TREE type to its parent class and limiting Node type nesting to a maximum of 10 levels. Fix the issue with RedBlackTree objects being incorrectly compared when used as keys. Rename extractComparable to specificComparable. Correct the order of key and value in callback functions for the map and filter methods. Revone 2024-11-25 01:10:33 +1300
  • 1494ffa84f docs: more example code for RedBlackTree and BinarySearchTree Revone 2024-11-24 17:37:33 +1300
  • 4298ac658b feat: Add a rangeSearch method to binary search tree data structures and support tuple parameters as the query range. Revone 2024-11-23 22:49:36 +1300
  • 5077c0d291 docs: Improve the documentation for pushMany, addMany, and similar methods. Revone 2024-11-23 21:57:13 +1300
  • f1fecd828a feat: Add pushMany, addMany, unshiftMany, or addMany methods to all data structures. Revone 2024-11-23 21:36:05 +1300
  • ca7e60e465 fix: rename the keyValueNodeEntryRawToNodeAndValue to _keyValueNodeEntryRawToNodeAndValue and make it protected Revone 2024-11-22 22:55:43 +1300
  • aab0c87da0 docs: add example code for Trie Revone 2024-11-22 19:53:32 +1300
  • e4ebf5fae1 fix: Skip writing when the ci process cannot read the subpackages directory. Revone 2024-11-22 17:48:13 +1300
  • c3122e7fc7 fix: Type safety fixes for ComparableObject. feat: Use extractComparable in the BST data structure to control key comparisons instead of directly passing a comparator. Use isReverse to control whether the tree is reversed instead of relying on the comparator. Removed the unnecessary getNodeByKey method.chore: Support list configuration for performance testing. Revone 2024-11-22 17:12:06 +1300
  • 080a671de1 feat: add range search functionality to BST Revone 2024-11-22 11:23:57 +1300
  • 713b145a1c feat: Add a highly generic search method to binary tree data structures. Adjust the parameter order for the getPathToRoot method. Add example code to the BST documentation. Rename the get method in DoublyLinkedList and SinglyLinkedList to search. Revone 2024-11-21 19:02:19 +1300
  • a0623db58c style: Beautify code format for test case conversion examples Revone 2024-11-21 11:48:24 +1300
  • a1c468b19b chore: Automate writing code examples to README.md for sub-packages Revone 2024-11-21 10:45:32 +1300
  • fde5af1f1c fix: #114. feat: Enhanced SinglyLinkedList methods to support Node type parameters for push, unshift, addAfter, addBefore, getNode, addAt, delete, indexOf; added a new get method. Revone 2024-11-20 22:07:42 +1300
  • 09a5d8a11a feat: Enhanced DoublyLinkedList methods to support Node type parameters for push, unshift, addAfter, addBefore, getNode, addAt, delete, indexOf, and getBackward; added a new get method. Revone 2024-11-20 20:43:22 +1300
  • 1b0ee601ac fix: Fix the bug where a regex replacement error occurs when test cases contain both .toBeUndefined() and .toBe or .toEqual. Revone 2024-11-20 17:29:44 +1300
  • f84518cc6d fix: Fixed a bug in the DoublyLinkedList.delete method. Improved the feature for generating sample code documentation for test cases. Added classic example code for Heap and DoublyLinkedList. Revone 2024-11-20 16:27:37 +1300
  • e09be8c3a6 chore: Implement unit tests as example code in the README.md and source code comments. Revone 2024-11-19 23:21:40 +1300
  • 0ff5ddc410 chore: Implement unit tests as example code in the README.md and source code comments. Revone 2024-11-19 23:20:25 +1300
  • 476395ef72 chore: Add source map support for ESModule. Add a 'browser' field to package.json. Performance optimization of getRandomIntArray method Revone 2024-11-16 23:07:53 +1300
  • 5adf75f99c fix: Fix the bug where the binary tree repeatedly adds elements with the same key in map mode and the bug where the node’s value is instantiated simultaneously. Enable map mode by default. Revone 2024-11-03 16:38:07 +1300
  • 37ff9207fe release: v1.53.0 Revone 2024-11-01 19:40:53 +1300
  • 28ff30ea4b feat: The binary trees support storing values in a Map and provides parameters for Map mode. #111. Rename type definitions and parameter names to align with best practices. Revone 2024-11-01 19:40:19 +1300
  • 8ae577315a release: v1.52.9 Revone 2024-10-31 17:13:36 +1300
  • 6ef4b47b0b docs: Complete the documentation for the print method in BinaryTree. Correct the unit tests for the print method. Revone 2024-10-31 16:44:01 +1300
  • 9ace395564 fix: Fix bug in BinaryTree.print to support undefined, null, and NIL. Fix #106 Revone 2024-10-31 16:18:51 +1300
  • 0a8b9265cc fix: #110 Revone 2024-10-31 13:26:45 +1300
  • 761c1c6af4 fix: #110 Revone 2024-10-31 13:20:00 +1300
  • 5992ae5d0d release: v1.52.8 wiht ci flow fixed Revone 2024-10-31 09:41:03 +1300
  • 9e62968e3d release: v1.52.8 Revone 2024-10-30 21:28:20 +1300
  • 487f45f6b2 release: v1.52.7 Revone 2024-10-30 21:00:03 +1300
  • 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. Revone 2024-10-30 20:52:23 +1300
  • 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. Revone 2024-10-30 15:30:28 +1300
  • aece11bd01 release: v1.52.6 Revone 2024-10-29 17:27:40 +1300
  • a29dc270e6 Change the print method to return a value instead of directly calling console.log.Unify the logic of all keyValueOrEntryOrRawElementToNode methods in BinaryTree. Use a generic isComparable method to determine if a value is comparable in size when using the isKey method in the BinaryTree. Fix the boundary value bug in the getNodes method of BinaryTree. Support callback functions in getLeftMost and getRightMost to support returning results with different properties. If a comparator is specified for BST, the isKey method will force the object type to be comparable. The isComparable method has been implemented based on JavaScript's comparison principles. Revone 2024-10-29 16:23:24 +1300
  • 9f197d48b0 fix: import * as console from 'console' removed Revone 2024-10-21 21:41:56 +1300
  • 18fe006652 style: Remove unnecessary comments. Revone 2024-10-21 21:34:51 +1300
  • 5a492c1801 refactor: To standardize the _dfs method of the BinaryTree to achieve full generalization. Revone 2024-10-21 20:55:48 +1300
  • e271f73de0 feat: Refactor the BinaryTree's dfs method into a private helper function _dfs to prepare for a more generic implementation. Revone 2024-10-21 19:14:36 +1300
  • 42235802c3 fix: The default value for the iterationType parameter in all binary tree methods is the member variable this.iterationType. Revone 2024-10-20 17:22:45 +1300
  • a699b097c7 feat: The leaves method of the binary tree supports both RECURSIVE and ITERATIVE modes. Revone 2024-10-20 16:59:01 +1300
  • 85b79ff1ad feat: All binary tree data structures support the leaves method. It is used to find all leaf nodes. Revone 2024-10-20 15:40:02 +1300
  • ea0d4272df fix: Fix #100 the return type error in the find method's callback function in IterableEntryBase. Add test cases for HashMap and Stack. Revone 2024-10-19 19:51:49 +1300
  • 07dd75de70 test: The test cases have been added, though slightly tricky. The overall test coverage is currently at 93.27%. Revone 2024-10-16 21:55:48 +1300
  • e6acc0f8f1 docs: diagram width Revone 2024-10-11 22:50:11 +1300
  • 68d4ca3b10 docs: Merging colloquial descriptions with data structure selection Revone 2024-10-11 22:47:06 +1300
  • 2acd0fe366 release: version 1.52.4 Revone 2024-10-11 11:07:43 +1300
  • e5bdaec771
    Merge pull request #95 from philipplentzen/main zrwusa 2024-10-11 10:33:46 +1300
  • b90da5cf82 docs(queue): fix mismatch between typings and jsdoc Philipp Lentzen 2024-10-10 13:34:19 +0200
  • bf37a4df7f style: optimization of code style of HashMap zrwusa 2024-09-19 17:20:58 +1200
  • 986e7cfd8f release: v1.52.3 Revone 2024-09-03 10:22:22 +1200
  • 93981f6932 Merge branch 'main' of https://github.com/zrwusa/data-structure-typed Revone 2024-09-03 09:45:06 +1200
  • 022c337ca9
    Merge pull request #94 from sjunepark/trie zrwusa 2024-09-03 09:31:09 +1200
  • f2bbba8a9b chore: loop to check if remote package is exist Revone 2024-09-03 09:28:46 +1200
  • 59cf685395 fix(trie): trie returns invalid string when only the fist character matches, and the second doesn't match June Park 2024-09-03 00:49:53 +0900
  • 7e45aaf609 style: Prettier version updated. Code style adhered to Prettier strictly. Revone 2024-08-27 10:56:04 +1200
  • ac1712ba04 feat: supports compact method to save memory. #91 Revone 2024-08-27 10:24:38 +1200
  • 5ff8eb97d9 release: v1.52.1 Revone 2024-08-04 19:41:40 +1200
  • 6710e9d41e release: v1.52.1 Revone 2024-08-04 19:20:21 +1200
  • 3e91a97987 fix: #89. Supports maxLen for max length of the Deque Revone 2024-08-04 19:19:14 +1200
  • c7dbfd54f1 fix: #87 Revone 2024-08-04 19:05:19 +1200
  • abfb441bc7 docs: priority queue is heap Revone 2024-08-02 10:15:56 +1200
  • 6642f8b66b docs: plain language explanations Revone 2024-07-31 21:04:20 +1200
  • 5d146cbfc2 docs: refined the table of deferences of data structures Revone 2024-07-31 14:33:55 +1200
  • 7f32fee19a docs: Added a document detailing the differences between various data structures, including schematic diagrams of the data structures. Revone 2024-07-31 14:10:32 +1200
  • 5dc132cb2a fix: #86 Revone 2024-03-16 09:59:48 +0800
  • ec8242044a refactor: Renamed some type aliases Revone 2024-03-16 09:47:22 +0800
  • 94d34e61e7 Merge branch 'main' of https://github.com/zrwusa/data-structure-typed Revone 2024-02-01 23:26:49 +0800
  • 8616e4ddc4 release: 1.52.0 Revone 2024-02-01 23:26:45 +0800
  • 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. Revone 2024-02-01 21:05:10 +0800
  • 6539e50598 feat: Provide custom toElementFn in Heap configuration options to transform user raw data into a specified element type within a single loop. Revone 2024-01-31 10:04:21 +0800
  • 8051850331 feat: When comparing two values in the Heap and binary search tree, if one of the values is of object type, it is mandatory to pass a custom comparator function. Revone 2024-01-29 20:23:06 +0800
  • 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. Revone 2024-01-29 11:35:24 +0800
  • 6fccb57f1b
    Update README.md zrwusa 2024-01-27 11:10:38 +0800
  • c2f98f851b release: 1.51.9 Revone 2024-01-26 18:26:40 +0800
  • 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. Revone 2024-01-26 18:20:15 +0800
  • 3c26538c2e release: 1.51.8 Revone 2024-01-25 10:55:59 +0800
  • 0013242189 Refactor: In the binary search tree data structure, use a comparator instead of a variant configuration for comparison. Revone 2024-01-25 10:24:25 +0800
  • 89dadfccc2 Refactor: Remove the unnecessary design of the extractor in the Binary Search Tree (BST). Utilize 1, -1, and 0 to replace the original comparison results GT, LT, and EQ. Revone 2024-01-25 09:38:03 +0800
  • 1303aba070 refactor: Use Comparable type constraint for the key in the binary tree to improve comparator performance. Revone 2024-01-24 18:38:34 +0800