2020年9月21日

摘要: 地址 https://leetcode-cn.com/problems/rearrange-spaces-between-words/ 给你一个字符串 text ,该字符串由若干被空格包围的单词组成。 每个单词由一个或者多个小写英文字母组成,并且两个单词之间至少存在一个空格。 题目测试用例保证 te 阅读全文
posted @ 2020-09-21 19:09 itdef 阅读(256) 评论(0) 推荐(0)
摘要: 地址 https://leetcode-cn.com/problems/sum-of-all-odd-length-subarrays/ 给你一个正整数数组 arr ,请你计算所有可能的奇数长度子数组的和。 子数组 定义为原数组中的一个连续子序列。 请你返回 arr 中 所有奇数长度子数组的和 。 阅读全文
posted @ 2020-09-21 19:07 itdef 阅读(394) 评论(0) 推荐(0)
摘要: 地址 https://leetcode-cn.com/problems/split-a-string-into-the-max-number-of-unique-substrings/ 给你一个字符串 s ,请你拆分该字符串,并返回拆分后唯一子字符串的最大数目。 字符串 s 拆分后可以得到若干 非空 阅读全文
posted @ 2020-09-21 19:05 itdef 阅读(312) 评论(0) 推荐(0)
摘要: 地址 https://leetcode-cn.com/problems/convert-bst-to-greater-tree/ 给定一个二叉搜索树(Binary Search Tree),把它转换成为累加树(Greater Tree), 使得每个节点的值是原来的节点值加上所有大于它的节点值之和。 阅读全文
posted @ 2020-09-21 18:54 itdef 阅读(166) 评论(0) 推荐(0)

导航