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 ...
分类:
其他好文 时间:
2016-09-15 16:33:51
阅读次数:
134
一、String Format for Double Digits after decimal point This example formats double to string with fixed number of decimal places. For two decimal place ...
A message containing letters from A-Z is being encoded to numbers using the following mapping: Given an encoded message containing digits, determine t ...
分类:
其他好文 时间:
2016-09-11 22:57:30
阅读次数:
164
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 a ...
分类:
其他好文 时间:
2016-09-11 22:54:12
阅读次数:
156
题目: 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 l ...
分类:
其他好文 时间:
2016-09-11 09:00:20
阅读次数:
107
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-09-11 06:48:43
阅读次数:
146
Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 Solution1: 这道题做的太麻烦了,corner case很多,碰到负数不知道怎么给reverse。强行转成st ...
分类:
其他好文 时间:
2016-09-11 06:47:57
阅读次数:
130
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 a ...
分类:
其他好文 时间:
2016-09-10 09:00:14
阅读次数:
171
题目 Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 简单题,需要考虑两个问题,1)如果输入的末尾是0怎么办?2)如果倒过来的数字溢出了怎么办? ...
分类:
其他好文 时间:
2016-09-10 08:54:59
阅读次数:
122
题目: 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 ...
分类:
其他好文 时间:
2016-09-09 16:53:45
阅读次数:
106