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
114 stars 8 forks source link

In a binary tree, add and remove null nodes #70

Open zrwusa opened 8 months ago

zrwusa commented 8 months ago

Expected behavior

In a binary tree, add and remove null nodes. When adding a null node, the size of the binary tree does not need to increase, and when removing a null node, the size does not need to decrease.