C++
crazytom1988
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
x * x >= 0 一定成立吗?
https://mp.weixin.qq.com/s/GKyr0PuePPrYskHN6uUU6w 对于大多数编程语言,当 46341 <= int x <= 65535 时,x 的平方结果会是负数 。 其实,这确实是个问题,C 语言的处理方式是,-int_min 仍然等于 int_min,所以说负数的相反数不一定是正数哦,int_min 是唯一一个特例。 避免溢出: 还有一个...原创 2019-09-22 20:02:18 · 1794 阅读 · 0 评论 -
位运算
https://mp.weixin.qq.com/s/UJoDkBi9VRXW9R3RelR0fQ(这个也看下,不少技巧) https://blog.youkuaiyun.com/crazytom1988/article/details/101110639原创 2019-09-21 16:32:15 · 108 阅读 · 0 评论 -
leetcode 236. 二叉树的最近公共祖先
https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/ 思路参考 剑指offer52题 class Solution { public: TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* q) { ...原创 2019-09-30 20:26:32 · 107 阅读 · 0 评论
分享