leetcode 233: Number of Digit One
java python c++...
分类:
其他好文 时间:
2015-07-08 09:34:54
阅读次数:
439
遍历一遍就好class Solution: def __init__(self): self.mapping = {'2': 'abc', '3': 'def', '4': 'ghi', '5': 'jkl', '6': 'mno', '7': 'pqrs', '8': 'tuv...
分类:
其他好文 时间:
2015-07-08 09:21:03
阅读次数:
96
Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n. For example: Given n = 13,Return...
分类:
其他好文 时间:
2015-07-08 07:06:15
阅读次数:
122
The following idea is taken from a book named 《剑指offer》 published in China.Supposen = 271, it then breaks[1, 271]into[1, 71]and[72, 271]. For[72, 271]...
分类:
其他好文 时间:
2015-07-08 02:07:20
阅读次数:
149
名词解释:1.内置:ECMAscript内置函数:ECMAscript自带的函数Number()宿主函数:BOMDOMalert()prompt()confirm();//confirm()弹出一个带有确定和取消按钮的一个对话框,确定返回真,取消返回假。2.顶层字符串函数:字符串.函数()数组函数顶层对象的函数,可以作用于任何对象。内..
分类:
编程语言 时间:
2015-07-08 00:49:16
阅读次数:
148
本文是网易云课堂金旭亮老师的课程笔记,记录下来,以供备忘。变量类型 只有6种 : 四种原始数据类型boolean , number, string , undefine, 其他object,function是对象typeof,instanceof ...
分类:
编程语言 时间:
2015-07-08 00:17:04
阅读次数:
188
Given a 2d grid map of '1's (land) and '0's
(water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assu...
分类:
其他好文 时间:
2015-07-07 22:57:28
阅读次数:
152
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.
Calling next() will return the next smallest number in the BST.
Note: next()...
分类:
其他好文 时间:
2015-07-07 22:50:37
阅读次数:
208
DROP TABLE IF EXISTS `emp`;CREATE TABLE `emp` ( `id` int(11) NOT NULL AUTO_INCREMENT, `number` int(11) DEFAULT NULL, `name` varchar(255) DEFAULT NU...
分类:
其他好文 时间:
2015-07-07 22:41:42
阅读次数:
192
用十进制计算30!(30的阶乘),将结果转换成3进制进行表示的话,该进制下的结果末尾会有____个0。答案选14#includeusing namespace std;#define LINT intLINT count_number(LINT n){ LINT a=n; LINT re=0; wh...
分类:
其他好文 时间:
2015-07-07 22:40:14
阅读次数:
350