码迷,mamicode.com
首页 >  
搜索关键字:number of islands    ( 27069个结果
js中的克隆小解
js一般有两种不同数据类型的值: 基本类型(包括undefined,Null,boolean,String,Number),按值传递; 引用类型(包括数组,对象),按址传递,引用类型在值传递的时候是内存中的地址。克隆或者拷贝分为2种: 浅度克隆:基本类型为值传递,对象仍为引用传递。 深度克隆...
分类:Web程序   时间:2014-09-21 22:36:51    阅读次数:355
HashMap和HashSet原理及底层实现
HashMap底层用哈希算法实现,下面看一下哈希算法的整体概括: 当map.put(“key”,”values”);的时候,底层是这样的:   static final Entry[] EMPTY_TABLE = {};    transient Entry[] table = (Entry[]) EMPTY_TABLE;  /** * The number of key-...
分类:其他好文   时间:2014-09-21 16:37:10    阅读次数:361
HDU 1005 Number Sequence (循环节)
首先暴力打表就很容易发现有循环节,于是一开始的写法是直接暴力找循环节,结果一直WA, 原因是有的循环并不是从1,1开始的,详细有证明戳这里:http://acm.hdu.edu.cn/discuss/problem/post/reply.php?postid=19818&messageid=1&deep=0 于是借鉴了大神的思路,因为%7,故可用v[7][7]来记录 f(n) = (A * f...
分类:其他好文   时间:2014-09-21 11:56:10    阅读次数:222
Leetcode: Sum Root to Leaf Numbers
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...
分类:其他好文   时间:2014-09-21 08:55:00    阅读次数:190
HDU-5031-Lines(DFS)
Problem Description You play a game with your friend. He draws several lines on the paper with n×m square grids (see the left figure). After that, he writes down the number of lines passing through...
分类:其他好文   时间:2014-09-21 02:54:39    阅读次数:381
原子性 与 可见性
加锁机制既可以确保可见性又可以确保原子性,而volatile变量只能确保可见性。public class NoVisibility { private static boolean ready; private static int number; private stat...
分类:其他好文   时间:2014-09-20 18:36:39    阅读次数:213
usb host鼠标不能使用原因
linux kernel 3.4.5的板子插入USB鼠标,出现例如以下错误LOG:[ 191.177508] Plug in USB Port2[ 191.363516] usb 1-1: new full speed USB device number 10 using Mstar-ehci-2[...
分类:其他好文   时间:2014-09-20 18:25:49    阅读次数:152
NYOJ-a letter and a number
a letter and a number 时间限制:3000 ms  |  内存限制:65535 KB 难度:1 描述we define f(A) = 1, f(a) = -1, f(B) = 2, f(b) = -2, ... f(Z) = 26, f(z) = -26; Give you a letter x and a number y , you should...
分类:其他好文   时间:2014-09-20 17:26:19    阅读次数:192
QlikView中实现SQL Server中的RowNumber() Over(Partition by)
经常有这样的需求,当A字段有很多重复的值,但是B字段中的值在按A字段分组后是唯一的,因此SELECT A, B字段的时候不知道取B字段中的哪个值,因此在A字段重复的时候想取B字段的值,需要根据C字段中最大最小的值所对应的那一行数据。 在SQL Server 里面可以用如下方式实现,Row_Number() Over(Partition by A Order by C) ID,然后取ID=1。 ...
分类:数据库   时间:2014-09-20 16:27:59    阅读次数:259
There has been an error processing your request magento
如果使用magento的过程中,出现以下页面:说明出现了错误,但是亲,不用紧张,请根据"Error record number:xxxxxxxxx"的数字在网站根目录下的var/report中找到对应的报告并打开,里面有具体的问题。这种报错的产生,通常是使用了不兼容的模板或组件,有些情况下,数据库连...
分类:其他好文   时间:2014-09-20 15:54:29    阅读次数:150
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!