230. Kth Smallest Element in a BST
Description: Given 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 tree. # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right ''' [1] recursive) idea:: compare the number of nodes of left sub-tree (denot..
2021.11.16