leetcode C++
小宁同学
这个作者很懒,什么都没留下…
展开
-
LeetCode:3Sum, 3Sum Closest, 4Sum
3Sum Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:Elements in a t原创 2016-03-30 09:41:28 · 255 阅读 · 0 评论 -
从leetcode—Generate Parentheses看卡特兰数
Generate ParenthesesGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:"((()))", "(()())", "原创 2016-04-06 10:11:48 · 481 阅读 · 0 评论