LeetCode 105. 重建二叉树from VLR && LVRTreeNode* buildTree (vector<int>& preorder, vector<int>& inorder) { return creat ...
剑指offer刷题计划
理想状态:字符串(8题) 7.1数组 (11题) 7.2链表(8题) 7.3二叉树 (12题) 7.4 字符串string string 与 char 左旋转字符串注意这个if条件,不要漏掉 翻转单词顺序列str += ' ', 在字符串末尾添加一个空格字符。 ...
permutation & combination
LeetCode next permutation这道题的讨论区解答很详细, 特别注意一下 reverse(nums.begin(), nums.end()) 参数是迭代器。 class Solution {public: void nextPermutation (vector&l ...