2014年5月23日
摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" are all valid bu... 阅读全文
posted @ 2014-05-23 13:35 JessiaDing 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the lin... 阅读全文
posted @ 2014-05-23 12:03 JessiaDing 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Note: Elements in ... 阅读全文
posted @ 2014-05-23 11:34 JessiaDing 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly... 阅读全文
posted @ 2014-05-23 11:13 JessiaDing 阅读(120) 评论(0) 推荐(0) 编辑