11 2020 档案

剑指offer54
摘要:/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), r 阅读全文

posted @ 2020-11-17 10:14 在苏州的城边 阅读(94) 评论(0) 推荐(0)

剑指offer38字符串的排列
摘要:/*可重排列模版题目*/ class Solution { public: void print_permutation(vector<string>& ans ,int n , string &A , string s ,int cur){ if(cur == n){ ans.push_back( 阅读全文

posted @ 2020-11-12 16:01 在苏州的城边 阅读(95) 评论(0) 推荐(0)

剑指offer40数组最小的k个数
摘要:/*给定非排序数据找第k大数字练手题*/ /*快排核心算法partition 线性时间找数组第k大的数 */ /*允许改变数组顺序 很多简单的题目但是对时间要求更优化的题目都可以转化成这个知识点*/ class Solution { public: int Partition(vector<int> 阅读全文

posted @ 2020-11-11 21:56 在苏州的城边 阅读(92) 评论(0) 推荐(0)

导航