码迷,mamicode.com
首页 >  
搜索关键字:number    ( 26994个结果
LeetCode-115 Distinct Subsequences
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
分类:其他好文   时间:2015-03-13 00:20:24    阅读次数:178
Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:其他好文   时间:2015-03-13 00:14:25    阅读次数:141
【LeetCode】Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [?2,1,?3,4,?1,2,1,?5,4], the contiguous subarray [4,?1,2,1] has the largest sum = 6....
分类:其他好文   时间:2015-03-12 22:42:13    阅读次数:158
【LeetCode】Single Number II
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 using extra memory?...
分类:其他好文   时间:2015-03-12 22:35:49    阅读次数:164
判断质数的几种方法
根据维基百科定义,质数(Prime number),又称素数,指在大于1的自然数中,除了1和此整数自身外,无法被其他自然数整除的数(也可定义为只有1和本身两个因数的数)。比1大但不是素数的数称为合数。1和0既非素数也非合数。质数在公钥加密算法(如RSA)中有重要的地位。 下边将会介绍几种较为常...
分类:其他好文   时间:2015-03-12 22:17:57    阅读次数:217
leetcode:3Sum Closest
题目要求:Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. ...
分类:其他好文   时间:2015-03-12 22:03:43    阅读次数:119
AS3类和类名的判断、获取、转换等
1.is——判断对象/类是否属于某一类,返回布尔值例:123 is Number返回:true例:int is Object返回:true2.as——判断对象/类是否属于某一类,成功返回对象本身,失败返回null例: 123 as uint返回:123例:123 as string返回:null注:...
分类:其他好文   时间:2015-03-12 20:44:02    阅读次数:112
[LeetCode] 3Sum Closest
Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. You m...
分类:其他好文   时间:2015-03-12 18:35:18    阅读次数:118
hdu 1492 The number of divisors(约数) about Humble Numbers 数论~~
Problem Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the first 20 humble numbers. Now given a humble number, please w...
分类:其他好文   时间:2015-03-12 17:17:24    阅读次数:128
leetcode-1 Two Sum 找到数组中两数字和为指定和
?? 问题描述:在一个数组(无序)中快速找出两个数字,使得两个数字之和等于一个给定的值。假设数组中肯定存在至少一组满足要求。 《剑指Offer》P214(有序数组) 《编程之美》P176 Que:Given an array of integers, find twonumbers such that they add up to a specific target number...
分类:编程语言   时间:2015-03-12 17:13:37    阅读次数:8101
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!