【leetcode】刷题家之701. Insert into a Binary Search Tree
请看题
一个简单的二叉树插入。
一颗二叉树的表现方式为,其左孩小于当前节点,其右孩大于当前节点。知道了这个就非常的简单了。只需要两个判断就能成功的去进行插入节点。
非常的简单,直接看代码。
1 |
|
【leetcode】刷题家之701. Insert into a Binary Search Tree
http://1eqw.com/2025/04/10/701. Insert into a Binary Search Tree/