2016年4月17日

20. Valid Parentheses (Stack)

摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the 阅读全文

posted @ 2016-04-17 18:05 joannae 阅读(211) 评论(0) 推荐(0) 编辑

19. Remove Nth Node From End of List

摘要: 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 rem 阅读全文

posted @ 2016-04-17 12:10 joannae 阅读(145) 评论(0) 推荐(0) 编辑

18. 4Sum (通用算法 nSum)

摘要: 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 whic 阅读全文

posted @ 2016-04-17 11:56 joannae 阅读(392) 评论(0) 推荐(0) 编辑

导航