上一页 1 2 3 4 5 6 ··· 14 下一页
摘要: 【题目】 Given an array of integers, find out whether there are two distinct indicesiandjin the array such that the difference betweennums[i]andnums[j]is... 阅读全文
posted @ 2015-06-03 20:02 hwu_harry 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 【final】1. 修饰类的话,该类不能被继承(没有子类);2. 修饰方法的话,该方法可以被继承,不能被覆盖;3. 修饰成员变量的话,该变量为常量,只能被赋值一次,赋值后值不再改变;4. final不能修饰构造函数(构造函数不能被子类继承)【static】1. 修饰成员变量的话,该变量相当于是一个全... 阅读全文
posted @ 2015-06-02 09:47 hwu_harry 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 一.HashMap的实现机制 1.HashMap是基于哈希表的map接口的非同步实现。HashMap相当于一个数组,数组的每个元素为一个链表。 2.向HashMap中插入一个Entry时,先计算Key的hashcode,根据hashcode确定Entry在数组中的位置,再根据equals判断是否... 阅读全文
posted @ 2015-05-26 09:50 hwu_harry 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 【题目】 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 adj... 阅读全文
posted @ 2015-05-23 15:41 hwu_harry 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1. 统计工具wc -w : 单词数 ;-l :行数2. 解压 tar -xvf file.tar tar -zxvf file.tar.gz tar -jxvf file file.tar.bz2 tar -Zxvf file.tar.Z unrar file.rar unzip f... 阅读全文
posted @ 2015-05-22 20:35 hwu_harry 阅读(102) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 14 下一页