![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
hjhjavac
这个作者很懒,什么都没留下…
展开
-
【Leetcode算法】-Add Digits
题目: Add Digits Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has原创 2015-10-02 01:02:11 · 671 阅读 · 0 评论 -
【Leetcode算法】- Move Zeroes
Move ZeroesGiven 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 calling原创 2015-10-02 01:17:01 · 512 阅读 · 1 评论 -
【Leetcode算法】- Add Binary
题目: Given two binary strings, return their sum (also a binary string).For example, a = “11” b = “1” Return “100”.链接: https://leetcode.com/problems/add-binary/#include <iostream> #include <string> u原创 2015-10-05 19:27:45 · 330 阅读 · 0 评论 -
【Leetcode算法】- Rotate Array
题目: Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note: Try to come up as many solutions as you can,原创 2015-10-05 21:47:35 · 386 阅读 · 0 评论