![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
分治 Divide and Conquer
我家小狗迷路了
这个作者很懒,什么都没留下…
展开
-
[LeetCode] 241. Different Ways to Add Parentheses
Problem :Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are +, - and *.原创 2017-09-23 21:50:22 · 148 阅读 · 0 评论 -
[LeetCode] 169. Majority Element
Description :Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and th原创 2017-09-17 10:25:22 · 234 阅读 · 0 评论 -
[LeetCode] 617. Merge Two Binary Trees
Problem :Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.You need to merge them into原创 2017-11-08 13:27:10 · 138 阅读 · 0 评论 -
[LeetCode] 654. Maximum Binary Tree
Problem:Given an integer array with no duplicates. A maximum tree building on this array is defined as follow:The root is the maximum number in the array.The left subtree is the maximum tree原创 2017-11-07 19:00:22 · 142 阅读 · 0 评论 -
[LeetCode] 669.Trim a Binary Search Tree
Problem :Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >= L). You might need to change the root of the原创 2017-11-08 19:51:52 · 161 阅读 · 0 评论 -
[剑指offer] 字符串的排序
Description:输入一个字符串,按字典序打印出该字符串中字符的所有排列。例如输入字符串abc,则打印出由字符a,b,c所能排列出来的所有字符串abc, acb, bac, bca, cab和cba。输入一个字符串,长度不超过9(可能有字符重复),字符只包括大小写字母。Solution:public class Solution { public ArrayList<Strin...原创 2018-04-10 11:39:07 · 172 阅读 · 0 评论