Jason Xiao[LeetCode] 99. Recover Binary Search TreeYou are given the root of a binary search tree (BST), where the values of exactly two nodes of the tree were swapped by mistake. Recover…Apr 20, 2022Apr 20, 2022
Jason Xiao[LeetCode] 230. Kth Smallest Element in a BSTGiven the root of a binary search tree, and an integer k, return the kth smallest value (1-indexed) of all the values of the nodes in the…Apr 18, 2022Apr 18, 2022
Jason Xiao[Leetcode] 700. Search in a Binary Search TreeYou are given the root of a binary search tree (BST) and an integer val.Apr 18, 2022Apr 18, 2022
Jason Xiao[LeetCode] 59. Spiral Matrix IIGiven a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order.Apr 13, 2022Apr 13, 2022