摘要:
题目链接:https://leetcode-cn.com/problems/er-cha-shu-zhong-he-wei-mou-yi-zhi-de-lu-jing-lcof/ 递归 时间复杂度:O(n) 空间复杂度:O(n) /** * Definition for a binary tree 阅读全文
摘要:
题目链接:https://leetcode-cn.com/problems/shu-zu-zhong-de-ni-xu-dui-lcof/ 归并排序 class Solution { public: int merge(vector<int>& nums, int l, int r) { if(l 阅读全文
摘要:
题目链接:https://leetcode-cn.com/problems/ji-qi-ren-de-yun-dong-fan-wei-lcof/ 搜索与回溯 class Solution { public: int get_single_sum(int x){ int s = 0; while(x 阅读全文