2015年7月29日

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 correct ... 阅读全文

posted @ 2015-07-29 21:09 joannae 阅读(281) 评论(0) 推荐(0) 编辑

19.Remove Nth Node From End of List(List; Two-Pointers)

摘要: Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After re... 阅读全文

posted @ 2015-07-29 20:41 joannae 阅读(169) 评论(0) 推荐(0) 编辑

18.4Sum (Map)

摘要: 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 @ 2015-07-29 20:05 joannae 阅读(238) 评论(0) 推荐(0) 编辑

导航