- 博客(2)
- 收藏
- 关注
原创 440. K-th Smallest in Lexicographical Order
Hard Given two integersnandk, returnthekthlexicographically smallest integer in the range[1, n]. Example 1: Input: n = 13, k = 2 Output: 10 Explanation: The lexicographical order is [1, 10, 11, 12, 13, 2, 3, 4, 5, 6, 7, 8, 9], so the second ...
2021-07-27 00:01:26 62
原创 Convert Sorted Array to Binary Search Tree
class Solution { public: TreeNode *sortedArrayToBST(vector<int> &nums) { unsigned long n = nums.size(); return buildTree(nums, 0, n - 1); } TreeNode *buildTree(vector<int> &nums, unsigned long l, unsigned l...
2021-07-26 22:12:15 41
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人