摘要:
动态规划:There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following ... 阅读全文
posted @ 2014-11-26 22:46
Jessica程序猿
阅读(273)
评论(0)
推荐(0)
摘要:
Divide two integers without using multiplication, division and mod operator.思路:这道题属于数值处理的题目,对于整数处理的问题,在Reverse Integer中我有提到过,比较重要的注意点在于符号和处理越界的问题。对于这道... 阅读全文
posted @ 2014-11-26 21:54
Jessica程序猿
阅读(164)
评论(0)
推荐(0)
摘要:
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu... 阅读全文
posted @ 2014-11-26 17:24
Jessica程序猿
阅读(398)
评论(0)
推荐(0)
摘要:
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.参考:http://blog.csdn.net/doc_sgl/article/details/17103... 阅读全文
posted @ 2014-11-26 16:22
Jessica程序猿
阅读(170)
评论(0)
推荐(0)
摘要:
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ... 阅读全文
posted @ 2014-11-26 10:50
Jessica程序猿
阅读(226)
评论(0)
推荐(0)
摘要:
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy ... 阅读全文
posted @ 2014-11-26 09:27
Jessica程序猿
阅读(169)
评论(0)
推荐(0)

浙公网安备 33010602011771号