题目描述: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. 样例 Given num = 38. The process is like: 3 + ...
分类:
其他好文 时间:
2017-02-11 17:01:17
阅读次数:
187
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. ...
分类:
其他好文 时间:
2017-02-10 12:41:28
阅读次数:
141
Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2.Note:The length of both num1 and num2 is =0;... ...
分类:
其他好文 时间:
2017-02-09 15:30:20
阅读次数:
260
Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and t ...
Given a list, rotate the list to the right by k places, where k is non-negative. For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3- ...
分类:
其他好文 时间:
2017-02-04 10:41:40
阅读次数:
167
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai ...
分类:
其他好文 时间:
2017-02-03 16:53:18
阅读次数:
152
Given a data stream input of non-negative integers a1, a2, ..., an, ..., summarize the numbers seen so far as a list of disjoint intervals. For exampl ...
分类:
其他好文 时间:
2017-02-02 14:49:16
阅读次数:
203
class Solution {public: bool isPalindrome(int x) { //negative number if(x < 0) return false; int len = 1; while(x / len >= 10) len *= 10; while(x > 0) ...
分类:
其他好文 时间:
2017-02-01 21:42:20
阅读次数:
246
You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contai ...
分类:
其他好文 时间:
2017-01-31 10:29:09
阅读次数:
226
Largest Rectangle in Histogram Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area o ...
分类:
编程语言 时间:
2017-01-29 15:26:52
阅读次数:
185