题目如下: Given an array of strings arr. String s is a concatenation of a sub-sequence of arr which have unique characters. Return the maximum possible length of s. Example 1: Input: arr = ["un","iq","ue"] Output: 4 Explanation:…
原题链接在这里:https://leetcode.com/problems/maximum-length-of-a-concatenated-string-with-unique-characters/ 题目: Given an array of strings arr. String s is a concatenation of a sub-sequence of arr which have unique characters. Return the maximum possible le…
[LeetCode]718. Maximum Length of Repeated Subarray 解题报告(Python) 标签(空格分隔): LeetCode 作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 题目地址:https://leetcode.com/problems/maximum-length-of-repeated-subarray/description/ 题目描述: Given two integer arr…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 贪心算法 日期 题目地址:https://leetcode.com/problems/maximum-length-of-pair-chain/description/ 题目描述 You are given n pairs of numbers. In every pair, the first number is always smaller th…
题目如下: We are given the root node of a maximum tree: a tree where every node has a value greater than any other value in its subtree. Just as in the previous problem, the given tree was constructed from an list A (root = Construct(A)) recursively with…
[LeetCode]662. Maximum Width of Binary Tree 解题报告(Python) 标签(空格分隔): LeetCode 题目地址:https://leetcode.com/problems/maximum-width-of-binary-tree/description/ 题目描述: Given a binary tree, write a function to get the maximum width of the given tree. The width…
[LeetCode]895. Maximum Frequency Stack 解题报告(Python) 作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 题目地址:https://leetcode.com/problems/maximum-frequency-stack/description/ 题目描述: Implement FreqStack, a class which simulates the operation of a…
Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Return 0 if the array contains less than 2 elements. Try to solve it in linear time/space. 题目来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/m…
作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 prefix Sum 日期 题目地址:https://leetcode-cn.com/problems/maximum-size-subarray-sum-equals-k/ 题目描述 Given an array nums and a target value k, find the maximum length of a subarray that…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 栈 日期 题目地址:https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/ 题目描述 Given a string S of lowercase letters, a duplicate removal consists of choosing two adjac…