
leetcode
newcica
True Strength is being able to hold it together when everyone is expecting you to fall apart.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Sum of two integer number
题目:两个整型数组相减,不能使用“+”和“-”(注意:两数相加并不知道两个数字是正书还是负数) 思路:在不能使用运算符号的条件下,只能考虑最底层的位运算 方法: 实现两数相加,但是不能用加号或者其他什么数学运算符号,那么我们只能回归计算机运算的本质,位操作Bit Manipulation,我们在做加法运算的时候,每位相加之后可能会有进位Carry产生,然后在下一位计算时需要加上进原创 2016-08-14 10:05:22 · 531 阅读 · 0 评论 -
leetcode,查找并移动某字符
问题: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, given nums = [0, 1, 0, 3, 12], after ca原创 2016-08-14 21:13:57 · 234 阅读 · 0 评论