问题:数组模拟整数加1class Solution {public: vector plusOne(vector &digits) { int i,k=0; int a[100]; for(i=digits.size()-1;i>=0;i--) ...
分类:
其他好文 时间:
2014-08-06 22:20:12
阅读次数:
187
题目又来了string的基本用法//less than 30 digits//等级长度甚至是超过了int64,所以要用字符串来模拟,然后注意去掉前导零//最多重复的个数就是答案//关于string的修改增加的用法#include #include#include #include #includeu...
分类:
其他好文 时间:
2014-08-06 17:23:51
阅读次数:
171
Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example: Given "25525511135",return ["25...
分类:
其他好文 时间:
2014-08-05 19:13:59
阅读次数:
225
题目原文:
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it ...
分类:
其他好文 时间:
2014-08-05 00:51:58
阅读次数:
257
题目:Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit i....
分类:
编程语言 时间:
2014-08-03 07:49:34
阅读次数:
246
题目:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here...
分类:
编程语言 时间:
2014-08-02 09:56:33
阅读次数:
249
题目:Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given "25525511135",return [....
分类:
编程语言 时间:
2014-08-02 09:49:53
阅读次数:
287
public class MoneyUtil { private final static String[] CN_Digits = { "零", "壹", "貳", "叁", "肆", "伍", "陆", "柒", "捌", "玖", }; /** * 将数字型货币转换为中文型货币 *...
分类:
其他好文 时间:
2014-08-01 15:20:01
阅读次数:
163
题目:Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 w....
分类:
编程语言 时间:
2014-08-01 06:57:21
阅读次数:
297
Problem Description:
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbe...
分类:
其他好文 时间:
2014-07-31 20:47:17
阅读次数:
215