Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is...
分类:
其他好文 时间:
2014-08-30 11:14:19
阅读次数:
209
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:
其他好文 时间:
2014-08-30 01:11:08
阅读次数:
286
题目:
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only cons...
分类:
其他好文 时间:
2014-08-29 13:13:37
阅读次数:
169
Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp...
分类:
其他好文 时间:
2014-08-29 01:18:36
阅读次数:
275
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.public cl...
分类:
其他好文 时间:
2014-08-29 01:16:36
阅读次数:
267
Bean bags for many years. Although it is an old design, people feel like it, and still one of the most sought after tools today. If you are looking fo...
分类:
其他好文 时间:
2014-08-28 13:01:39
阅读次数:
263
They are a very critical element of various warehouses and distribution centers. Bahamas. The fantastic modification should boost ideal properties eve...
分类:
其他好文 时间:
2014-08-28 09:37:59
阅读次数:
239
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
其他好文 时间:
2014-08-27 21:50:28
阅读次数:
210
1 Single NumberGiven an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear run...
分类:
其他好文 时间:
2014-08-27 18:38:28
阅读次数:
174
[ 问题: ]
Some examples:
"0" => true
" 0.1 " => true
"abc" => false
"1 a" => false
"2e10" => true
Note: It is intended for the problem statement to be ambiguous. You should gather all requirements up front before implementing one....
分类:
其他好文 时间:
2014-08-27 16:43:58
阅读次数:
177