![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法设计与分析
文章平均质量分 68
CoderWang1993
能在这里交到更多的朋友
展开
-
子集生成算法
问题描述 子集生成是暴力求解算法中比较经典的问题,给出集合A,求得相应的子集,进行打印。首先明确子集的定义,举个例子,如果一个集合是{1,2,3}\lbrace1,2,3\rbrace 那么生成的子集应当是空集,{1}\lbrace1\rbrace,{2}\lbrace2\rbrace,{3}\lbrace3\rbrace,{1,2}\lbrace1,2\rbrace,{1,3}\lbrace1,原创 2017-09-24 21:50:52 · 530 阅读 · 0 评论 -
Leetcode刷题Leetcode22
leetcode刷题笔记leetcode22 问题描述:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[ “((()))”,”(()())”, “((原创 2017-09-25 21:23:19 · 295 阅读 · 0 评论 -
leetcode刷题笔记
leetcode160 Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 → a2原创 2017-10-02 11:48:09 · 215 阅读 · 0 评论