会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
鸭子船长
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
15
16
17
18
19
20
21
22
23
···
119
下一页
2021年7月15日
C语言中嵌入汇编(转)
摘要: 格式: _asm_("asm statements":outputs:inputs:registers-modified) 其中,"asm statements"是汇编语句表达式,outputs,inputs,register-modified都是可选参数,以冒号隔开,且一次以0~9编号,如outp
阅读全文
posted @ 2021-07-15 11:19 鸭子船长
阅读(1026)
评论(0)
推荐(0)
2021年6月7日
Leetcode [654] 最大二叉树 &[105] 从前序与中序遍历序列构造二叉树 & [106] 从中序与后序遍历序列构造二叉树
摘要: 思路: labuladong手把手带你刷二叉树(第二期) 按照题目给出的例子,输入的数组为[3,2,1,6,0,5],对于整棵树的根节点来说,其实在做这件事: TreeNode constructMaximumBinaryTree([3,2,1,6,0,5]) { // 找到数组中的最大值 Tree
阅读全文
posted @ 2021-06-07 17:34 鸭子船长
阅读(65)
评论(0)
推荐(0)
2021年6月4日
Leetcode [226] 翻转二叉树 & [116] 填充每个节点的下一个右侧节点指针 & [114] 二叉树展开为链表
摘要: /* * @lc app=leetcode.cn id=226 lang=cpp * * [226] 翻转二叉树 * * https://leetcode-cn.com/problems/invert-binary-tree/description/ * * algorithms * Easy (7
阅读全文
posted @ 2021-06-04 16:40 鸭子船长
阅读(48)
评论(0)
推荐(0)
2021年5月26日
Leetcode 链表&二叉树刷题总结
摘要: 刷链表题目(训练递归思维) 递归反转链表的一部分 Leetcode [92][206]. 反转链表ii&i-输入一个链表,反转链表后,输出链表的所有元素。 如何k个一组反转链表 Leetcode 25. K 个一组反转链表 如何判断回文链表 Leetcode [234] 回文链表 回文 链表 二叉树
阅读全文
posted @ 2021-05-26 17:15 鸭子船长
阅读(59)
评论(0)
推荐(0)
2021年5月19日
Leetcode 动态规划刷题总结
摘要: 基本技巧 动态规划解题套路框架 基础代码框架介绍 动态规划答疑篇 最优子结构 状态压缩:对动态规划进行降维打击 动态规划和回溯算法到底谁是谁爹? 子序列类型问题 经典动态规划:编辑距离 Leetcode 72 编辑距离edit-distance-动态规划,计算两词之间变换的最小步数 信封嵌套问题 L
阅读全文
posted @ 2021-05-19 17:00 鸭子船长
阅读(140)
评论(0)
推荐(0)
Leetcode [1312] 让字符串成为回文串的最少插入次数 动态规划
摘要: /* * @lc app=leetcode.cn id=1312 lang=cpp * * [1312] 让字符串成为回文串的最少插入次数 * * https://leetcode-cn.com/problems/minimum-insertion-steps-to-make-a-string-pa
阅读全文
posted @ 2021-05-19 15:20 鸭子船长
阅读(496)
评论(0)
推荐(0)
2021年5月18日
Leetcode [234] 回文链表 回文 链表
摘要: /* * @lc app=leetcode.cn id=234 lang=cpp * * [234] 回文链表 * * https://leetcode-cn.com/problems/palindrome-linked-list/description/ * * algorithms * Easy
阅读全文
posted @ 2021-05-18 20:18 鸭子船长
阅读(75)
评论(0)
推荐(0)
动态规划之 KMP 算法详解(转)
摘要: 本文用pat表示模式串,长度为M,txt表示文本串,长度为N。KMP 算法是在txt中查找子串pat,如果存在,返回这个子串的起始索引,否则返回 -1。 一、KMP 算法概述 首先还是简单介绍一下 KMP 算法和暴力匹配算法的不同在哪里,难点在哪里,和动态规划有啥关系。 暴力的字符串匹配算法很容易写
阅读全文
posted @ 2021-05-18 16:07 鸭子船长
阅读(613)
评论(0)
推荐(0)
2021年5月17日
Leetcode [99] 恢复二叉搜索树 二叉树
摘要: /* * @lc app=leetcode.cn id=99 lang=cpp * * [99] 恢复二叉搜索树 * * https://leetcode-cn.com/problems/recover-binary-search-tree/description/ * * algorithms *
阅读全文
posted @ 2021-05-17 20:32 鸭子船长
阅读(295)
评论(0)
推荐(0)
统计代码行数
摘要: 1、 find . "(" -name "*.m" -or -name "*.mm" -or -name "*.cpp" -or -name "*.h" -or -name "*.rss" ")" -print | xargs wc -l 2、过滤空行 find . -name "*.m" -or
阅读全文
posted @ 2021-05-17 19:49 鸭子船长
阅读(194)
评论(0)
推荐(0)
上一页
1
···
15
16
17
18
19
20
21
22
23
···
119
下一页
公告