摘要:
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... 阅读全文
摘要:
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-... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
博主忙毕业的事情,一个半月木有刷题,感觉手都生了....今天开始闭关修炼~~先拿道简单的题练练手Two Sum(熟悉吧熟悉吧)Given an array of integers, find two numbers such that they add up to a specific target... 阅读全文
摘要:
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 ... 阅读全文
摘要:
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... 阅读全文