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 ...
分类:
其他好文 时间:
2014-09-07 22:19:15
阅读次数:
280
Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321思路: 1 class Solution { 2 public: 3 int reverse( int x ) {...
分类:
其他好文 时间:
2014-09-07 21:08:25
阅读次数:
235
Sum Root to Leaf Numbers
Total Accepted: 20237 Total
Submissions: 67979My Submissions
Given a binary tree containing digits from 0-9 only,
each root-to-leaf path could represent a numbe...
分类:
其他好文 时间:
2014-09-05 16:12:01
阅读次数:
200
考查,最高位有进位 1 class Solution { 2 public: 3 vector plusOne(vector &digits) { 4 // IMPORTANT: Please reset any member data you declared, as 5 ...
分类:
其他好文 时间:
2014-09-04 23:36:30
阅读次数:
256
public class Solution { public int[] plusOne(int[] digits) { for (int i=digits.length-1; i>=0; i--) { if (digits[i] != 9) { ...
分类:
其他好文 时间:
2014-09-04 01:36:30
阅读次数:
133
问题描述
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...
分类:
其他好文 时间:
2014-09-02 19:57:55
阅读次数:
166
问题描述
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....
分类:
其他好文 时间:
2014-08-31 23:05:42
阅读次数:
390
LeetCode: Restore IP AddressesGiven a string containing only digits, restore it by returning all possible valid IP address combinations. For example:G...
分类:
其他好文 时间:
2014-08-31 22:48:42
阅读次数:
314
Problem Description
Sudoku is a popular single player game. The objective is to fill a 9x9 matrix with digits so that each column, each row, and all 9 non-overlapping 3x3 sub-matrices contain all o...
分类:
其他好文 时间:
2014-08-30 11:18:09
阅读次数:
286
Description
a program that, given a natural number N between 0 and 4999 (inclusively), and M distinct decimal digits X1,X2..XM (at least one), finds the smallest strictly positive multiple of N that ...
分类:
其他好文 时间:
2014-08-26 21:34:06
阅读次数:
342