码迷,mamicode.com
首页 >  
搜索关键字:number of islands    ( 27069个结果
【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...
分类:其他好文   时间:2014-05-23 03:21:10    阅读次数:287
[LeetCode] [Palindrome Number 2012-01-04]
Determine whether an integer is a palindrome. Do this without extra space.if use recursive, like check the first dig and last dig, then remove them, c...
分类:其他好文   时间:2014-05-23 02:45:15    阅读次数:230
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...
分类:其他好文   时间:2014-05-22 16:05:56    阅读次数:239
深度解析javascript中的浅复制和深复制
原文:深度解析javascript中的浅复制和深复制 在谈javascript的浅复制和深复制之前,我们有必要在来讨论下js的数据类型。我们都知道有Number,Boolean,String,Null,Undefined,Object五种类型。而Object又包含Function,Array和Obj...
分类:编程语言   时间:2014-05-22 15:13:54    阅读次数:334
魔法数字(magic number)
什么叫魔法数字?就是在写代码的时候,我们经常会使用到一些数字,或者是用来switch,或者是用来赋值,虽然我们自己知道这些数字代表什么,但是别人可能有所疑惑,这样造成程序的可读性变差,这就是魔法数字。在程序开发中需要避免出现魔法数字解决办法:使用枚举或者是宏定义,来诠释数字1.枚举类型实质上就是一....
分类:其他好文   时间:2014-05-22 14:50:24    阅读次数:520
LeetCode: Combination Sum II [039]
【题目】 Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be used once in the combination. Note: All numbers (including target) will be ...
分类:其他好文   时间:2014-05-21 15:55:25    阅读次数:259
从两个TIMESTAMP中获取时间差(秒)
When you subtract two variables of type TIMESTAMP, you get an INTERVAL DAY TO SECOND which includes a number of milliseconds and/or microseconds depending on the platform. If the database is running o...
分类:其他好文   时间:2014-05-21 15:36:38    阅读次数:488
LeetCode: Combination Sum [038]
【题目】 Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C unlimited number of times. Note: All numbers (including target) w...
分类:其他好文   时间:2014-05-21 15:21:28    阅读次数:292
Leetcode: Combinations
参考别人的code, 看似不难的题,其实挺费事的。思想还是:From this example, we can see that in the first position of the resulting combinations we can chose number 1-5. Assume t...
分类:其他好文   时间:2014-05-21 14:24:04    阅读次数:241
LeetCode:Two Sum
题目:       Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up t...
分类:其他好文   时间:2014-05-21 07:42:18    阅读次数:230
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!