
LeetCode打怪刷题历险记
文章平均质量分 83
周清城
修电脑的和写代码的
展开
-
LeetCode344
P344倒置字符串 这里说的是字符串,并不是一个数组,所以在进行倒序之前,要先将它转化为字符数组,可以用头toCharArray(), 这里可以写成char [ ] word=s.toCharArray(); public class Solution { /** * 给定整数不断将它的各位相加,直到相加的结果小于10,返回结果原创 2016-07-03 21:24:34 · 428 阅读 · 0 评论 -
LeetCode258
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 only one原创 2016-07-04 15:05:54 · 391 阅读 · 0 评论