#include #include #includetypedef struct ListNode ListNode;typedef unsigned int uint;struct ListNode { uint loop_count; int number; ListNode *next; Li...
分类:
其他好文 时间:
2015-01-15 12:24:13
阅读次数:
187
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without usi...
分类:
其他好文 时间:
2015-01-15 11:03:15
阅读次数:
157
原文:从头开始学JavaScript (三)——数据类型一、分类
基本数据类型:undefined、null、string、Boolean、number
复杂数据类型:object
object的属性以无序的名称和值对的形式 (name : value) 来定义
二、详解
1、undefined:u...
分类:
编程语言 时间:
2015-01-15 10:38:45
阅读次数:
248
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 which represents the number 123.
Find the tota...
分类:
其他好文 时间:
2015-01-15 09:26:49
阅读次数:
117
Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A...
分类:
其他好文 时间:
2015-01-15 01:44:35
阅读次数:
243
Given a list of non negative integers, arrange them such that they form the largest number.For example, given[3, 30, 34, 5, 9], the largest formed num...
分类:
其他好文 时间:
2015-01-15 00:27:30
阅读次数:
155
Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed nu...
分类:
其他好文 时间:
2015-01-15 00:13:31
阅读次数:
257
题目:
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 which represents the number 123.
Find...
分类:
编程语言 时间:
2015-01-14 22:59:16
阅读次数:
431
问题描述:
Given a list of non negative integers, arrange them such that they form the largest number.
For example, given [3, 30, 34, 5, 9], the largest formed number is
9534330.
Note: The result may...
分类:
其他好文 时间:
2015-01-14 21:28:06
阅读次数:
196
打印出从1到最大的n位十进制数,如输入3 打印 1到 999
分析:
可能很多人想到直接求出 10的 n次方 ,然后从1打印到该数。这种情况只适合输入比较小的数字 如 1 2 3 4 5 但是当输入100时,肯定无法直接表示该数。
所以,用数组是一个不错的方法 number[n]
换种思路,n位所有十进制数其实就是n个0-9的数全排列的过程,只是排...
分类:
其他好文 时间:
2015-01-14 21:24:33
阅读次数:
215