请看题目描述: 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
分类:
其他好文 时间:
2016-03-11 16:57:27
阅读次数:
164
7. Reverse Integer Total Accepted: 126996 Total Submissions: 538523 Difficulty: Easy Reverse digits of an integer. Example1: x = 123, return 321 Examp
分类:
其他好文 时间:
2016-03-09 12:22:49
阅读次数:
140
Reverse digits of an integer. Returns 0 when the reversed integer overflows (signed 32-bit integer). Given x = 123, return 321 Given x = -123, return
分类:
其他好文 时间:
2016-03-06 11:24:46
阅读次数:
133
题目:
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 is at the head of the list.翻译:
给定一个非负数,它是有数字的数组组成,...
分类:
其他好文 时间:
2016-03-04 17:48:32
阅读次数:
126
题意让大数加1 我的做法是先让个位+1,再倒置digits,然后进位,最后倒置digits,得到答案。 1 class Solution { 2 public: 3 vector<int> plusOne(vector<int> &digits) { 4 digits[digits.size() -
分类:
其他好文 时间:
2016-03-02 23:25:29
阅读次数:
178
Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: Given "25525511135", return ["
分类:
其他好文 时间:
2016-03-02 15:05:51
阅读次数:
144
题目说明: 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 s...
分类:
编程语言 时间:
2016-02-24 15:32:07
阅读次数:
215
/** * Input an array of positive integers, arrange the integers to form new digits, * and output the smallest digit among all the new ones. * Input Ex
分类:
其他好文 时间:
2016-02-23 20:47:20
阅读次数:
265
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 whic
分类:
其他好文 时间:
2016-02-23 17:13:32
阅读次数:
241
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:
分类:
其他好文 时间:
2016-02-22 00:11:27
阅读次数:
154