摘要: hashmap map key and value for highly efficient lookup.hashmap search used binary tree O(log2)main methodsint size();hashmap.put(key,value);Value get(k... 阅读全文
posted @ 2015-06-18 03:14 微微程序媛 阅读(364) 评论(1) 推荐(0) 编辑
摘要: Rotate ListGiven a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3-... 阅读全文
posted @ 2015-06-12 08:36 微微程序媛 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Reverse Nodes in k-GroupGiven a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a... 阅读全文
posted @ 2015-06-08 09:04 微微程序媛 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Linklist定义:node includes pointer(next) and value区别(与Array):Array has indice,which is in sequence,LinkList has pointer to next.single list and double l... 阅读全文
posted @ 2015-06-06 06:24 微微程序媛 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all distinc... 阅读全文
posted @ 2015-06-03 03:13 微微程序媛 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 博主忙毕业的事情,一个半月木有刷题,感觉手都生了....今天开始闭关修炼~~先拿道简单的题练练手Two Sum(熟悉吧熟悉吧)Given an array of integers, find two numbers such that they add up to a specific target... 阅读全文
posted @ 2015-05-30 06:16 微微程序媛 阅读(205) 评论(0) 推荐(0) 编辑
摘要: MySQL top(MySQL limit)语法SELECT column_name(s)FROM table_nameLIMIT number例子SELECT *FROM PersonsLIMIT 5SQL LIKE 操作符SQL LIKE 操作符语法SELECT column_name(s)FR... 阅读全文
posted @ 2015-04-17 13:22 微微程序媛 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with ... 阅读全文
posted @ 2015-04-16 05:14 微微程序媛 阅读(88) 评论(0) 推荐(0) 编辑
摘要: SQL SELECT 语句如需获取名为 "LastName" 和 "FirstName" 的列的内容(从名为 "Persons" 的数据库表),请使用类似这样的 SELECT 语句:SELECT LastName,FirstName FROM Persons"Persons" 表:IdLastNam... 阅读全文
posted @ 2015-04-15 15:24 微微程序媛 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at... 阅读全文
posted @ 2015-04-13 07:41 微微程序媛 阅读(126) 评论(0) 推荐(0) 编辑