摘要:
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity... 阅读全文
posted @ 2014-07-05 15:14
Hicandyman
阅读(105)
评论(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-07-05 13:57
Hicandyman
阅读(157)
评论(0)
推荐(0)
摘要:
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ... 阅读全文
posted @ 2014-07-05 06:45
Hicandyman
阅读(104)
评论(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 @ 2014-07-05 05:43
Hicandyman
阅读(122)
评论(0)
推荐(0)
摘要:
Given an array of words and a lengthL, format the text such that each line has exactlyLcharacters and is fully (left and right) justified.You should p... 阅读全文
posted @ 2014-07-05 05:25
Hicandyman
阅读(100)
评论(0)
推荐(0)
浙公网安备 33010602011771号