摘要:
Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n. For example: Given n = 13,Return... 阅读全文
摘要:
解题思路:直接修改中序遍历函数即可,JAVA实现如下:int res = 0; int k = 0; public int kthSmallest(TreeNode root, int k) { this.k = k; inorderTraversal(root); return res; }... 阅读全文