排序:
默认
按更新时间
按访问量
RSS订阅

[剑指offer] 字符串的排序

Description:输入一个字符串,按字典序打印出该字符串中字符的所有排列。例如输入字符串abc,则打印出由字符a,b,c所能排列出来的所有字符串abc, acb, bac, bca, cab和cba。输入一个字符串,长度不超过9(可能有字符重复),字符只包括大小写字母。Solution:pu...

2018-04-10 11:39:07

阅读数 39

评论数 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 &g...

2017-11-08 19:51:52

阅读数 77

评论数 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...

2017-11-08 13:27:10

阅读数 59

评论数 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 ...

2017-11-07 19:00:22

阅读数 71

评论数 0

[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 a...

2017-09-23 21:50:22

阅读数 75

评论数 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 ...

2017-09-17 10:25:22

阅读数 111

评论数 0

提示
确定要删除当前文章?
取消 删除
关闭
关闭