题意:对于n,m,k,定义n的操作,+m,-m,*m,%m,(You should know that
if a = b * q + r (q > 0 and 0 3 #include 4 #include 5 #include 6 #include 7
using namespace s...
分类:
其他好文 时间:
2014-05-27 01:39:48
阅读次数:
285
What things should a programmer implementing
the technical details of a web application consider before making the site
public? If Jeff Atwood can for...
分类:
移动开发 时间:
2014-05-24 07:46:17
阅读次数:
405
You Should Fall In Love With Someone Who
InspiresYouFEB. 5, 2014BySTEPHANIE ALTHOFThere’s one trait that I continuously
find myself coming back to whe...
分类:
其他好文 时间:
2014-05-24 07:45:20
阅读次数:
264
Given a linked list and a valuex, partition it
such that all nodes less thanxcome before nodes greater than or equal tox.You
should preserve the origi...
分类:
其他好文 时间:
2014-05-24 04:59:06
阅读次数:
275
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-05-23 09:59:05
阅读次数:
257
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:
get and set.
get(key) - Get the value (will always be positive) of the key if t...
分类:
其他好文 时间:
2014-05-22 07:25:32
阅读次数:
254
题目:
Given an array of integers, every element appears
three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implem...
分类:
其他好文 时间:
2014-05-20 16:22:52
阅读次数:
241
戳我去解题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.分析:直...
分类:
其他好文 时间:
2014-05-20 08:52:09
阅读次数:
277
【题目】
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.
You may not alter the values in the nodes, only n...
分类:
其他好文 时间:
2014-05-18 10:22:34
阅读次数:
367
【题目】
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 constant space. You may not modify the values in the list, only nodes it...
分类:
其他好文 时间:
2014-05-18 08:37:57
阅读次数:
370