![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode算法
西瓜plus盐
做一个肉包怪不好嘛
展开
-
Leetcode练习23 --- Merge k Sorted Lists
1. Divide And Conquer/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int val) { this.val = val; } * ListNode(int val, ListNode next) { this.val = val; thi原创 2020-06-28 18:10:15 · 102 阅读 · 0 评论 -
Leetcode练习22 --- Generate Parentheses
1. brute forceclass Solution { // using the features of char array public List<String> generateParenthesis(int n) { List<String> combinations = new ArrayList(); // n pairs, the length of each combination is 2 * n原创 2020-06-27 20:16:19 · 105 阅读 · 0 评论