2015年8月29日

[LeetCode] 23 - Merge k Sorted Lists

摘要: Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity./** * Definition for singly-linked list. * struct List... 阅读全文

posted @ 2015-08-29 16:47 tuituji 阅读(121) 评论(0) 推荐(0) 编辑

[LeetCode] 22 - Generate Parentheses

摘要: Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))... 阅读全文

posted @ 2015-08-29 15:22 tuituji 阅读(117) 评论(0) 推荐(0) 编辑

[LeetCode] 16 - 3Sum Closest

摘要: Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. You m... 阅读全文

posted @ 2015-08-29 14:37 tuituji 阅读(178) 评论(0) 推荐(0) 编辑

[LeetCode] 15 - 3Sum

摘要: Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen... 阅读全文

posted @ 2015-08-29 13:53 tuituji 阅读(180) 评论(0) 推荐(0) 编辑

导航