zrwusa / data-structure-typed

Javascript Data Structure & TypeScript Data Structure. Heap, Binary Tree, Red Black Tree, Linked List, Deque, Trie, HashMap, Directed Graph, Undirected Graph, Binary Search Tree, AVL Tree, Priority Queue, Graph, Queue, Tree Multiset, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue, Stack.
https://data-structure-typed-docs.vercel.app
MIT License
119 stars 9 forks source link

Design of addMany method of binary tree data structures are complex. #48

Closed zrwusa closed 10 months ago

zrwusa commented 10 months ago

Describe the solution you'd like This design of addMany(keysOrNodes: (BTNKey | N | null | undefined)[], values?: (V | undefined)[]): (N | null | undefined)[] is somewhat complex, planning to change it to an 'entries' parameter form.

zrwusa commented 10 months ago

In version 1.47.7, we redesigned this API to use the entry style, simplifying parameters while maintaining compatibility with native JavaScript and supporting all iterable types.