Question:
A message containing letters from A-Z is being encoded to numbers using the following
mapping:
'A' -> 1
'B' -> 2
...
'Z' -> 26
Given an encoded message containing digits, determine...
分类:
其他好文 时间:
2016-08-10 21:12:59
阅读次数:
143
Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Example:Given n = 2, return 91. (The answer should be the ...
分类:
其他好文 时间:
2016-08-10 14:05:34
阅读次数:
129
Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example:Given "25525511135", return ["2 ...
分类:
其他好文 时间:
2016-08-09 20:47:30
阅读次数:
245
# 题目 2. Add Two Numbers You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their ...
357. Count Numbers with Unique Digits 357. Count Numbers with Unique Digits Total Accepted: 10844 Total Submissions: 25103 Difficulty: Medium Given a ...
分类:
其他好文 时间:
2016-08-07 17:00:59
阅读次数:
106
Different Digits Time Limit: 10000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1430 Accepted Submission(s): 39 ...
分类:
其他好文 时间:
2016-08-07 12:26:36
阅读次数:
230
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-08-07 06:13:19
阅读次数:
183
题意: 给定一个非负数n,要求算出所有符合条件的x。要求 0 ≤ x < 10^n,并且x的各位都不相同。 题解: 当n=0时,0<=x<1,因此只有x=0一种情况。 当n=1时,0<=x<10,即0-9共10种情况。 当n>=2时,最高位为1-9共9种情况,第二位不能与上一位相同但可以为0,因此也 ...
分类:
其他好文 时间:
2016-08-05 21:30:30
阅读次数:
96
Description A number is called quasibinary if its decimal representation contains only digits 0 or 1. For example, numbers 0, 1, 101, 110011 — are qua ...
分类:
其他好文 时间:
2016-08-04 23:14:17
阅读次数:
223