摘要:
A. Theatre SquareTheatre Square in the capital city of Berland has a rectangular shape with the sizen × mmeters. On the occasion of the city's anniver... 阅读全文
posted @ 2015-06-27 10:14
lilixu
阅读(278)
评论(0)
推荐(0)
摘要:
Remove all elements from a linked list of integers that have valueval.ExampleGiven:1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6,val= 6Return:1 --> 2 --> 3 --... 阅读全文
posted @ 2015-06-27 08:09
lilixu
阅读(131)
评论(0)
推荐(0)
摘要:
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu... 阅读全文
posted @ 2015-06-27 07:56
lilixu
阅读(121)
评论(0)
推荐(0)
摘要:
Write a SQL query to delete all duplicate email entries in a table namedPerson, keeping only unique emails based on itssmallestId.+----+--------------... 阅读全文
posted @ 2015-06-26 10:35
lilixu
阅读(325)
评论(0)
推荐(0)
摘要:
Given aWeathertable, write a SQL query to find all dates' Ids with higher temperature compared to its previous (yesterday's) dates.+---------+--------... 阅读全文
posted @ 2015-06-26 09:47
lilixu
阅读(1262)
评论(0)
推荐(0)
摘要:
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2015-06-26 09:34
lilixu
阅读(132)
评论(0)
推荐(0)
摘要:
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or... 阅读全文
posted @ 2015-06-25 10:23
lilixu
阅读(186)
评论(0)
推荐(0)
摘要:
Given an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may assume that the arr... 阅读全文
posted @ 2015-06-24 19:24
lilixu
阅读(121)
评论(0)
推荐(0)
摘要:
Print all palindromes of size greater than or equal to 3 of a given string.动态规划: p[j] 表示对于(i-1..j)这一段的字符串是否为回文。所以要使p[j] 为1的条件是中间的字符串(i-1..j-1)为回文(p[j-... 阅读全文
posted @ 2015-06-23 21:59
lilixu
阅读(148)
评论(0)
推荐(0)
摘要:
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the 阅读全文
posted @ 2015-06-22 19:23
lilixu
阅读(134)
评论(0)
推荐(0)
浙公网安备 33010602011771号