Day 17
Day 17
Lowest Common Ancestor of a Binary Search Tree
1 | class Solution { |
1 | func lowestCommonAncestor(root, p, q *TreeNode) *TreeNode { |
Insert into a Binary Search Tree
1 | class Solution { |
1 | func insertIntoBST(root *TreeNode, val int) *TreeNode { |
Delete Node in a BST
1 | class Solution { |
1 | func deleteNode(root *TreeNode, key int) *TreeNode { |