![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
BST
i-Blue
抱平常心走平常路
展开
-
Count of Smaller Numbers After Self
You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smaller elements to the right of nums[i]. Example:原创 2016-09-21 22:59:16 · 257 阅读 · 0 评论 -
235. Lowest Common Ancestor of a Binary Search Tree--dfs
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined betw原创 2016-10-24 22:03:36 · 277 阅读 · 0 评论