随笔分类 -  天天算法题

摘要:###重新排列空格 给你一个字符串 text ,该字符串由若干被空格包围的单词组成。每个单词由一个或者多个小写英文字母组成,并且两个单词之间至少存在一个空格。题目测试用例保证 text 至少包含一个单词 。 请你重新排列空格,使每对相邻单词之间的空格数目都 相等 ,并尽可能 最大化 该数目。如果不能 阅读全文
posted @ 2021-03-29 10:22 gege4105 阅读(153) 评论(0) 推荐(0)
摘要:Most Frequent Subtree Sum from : https://leetcode.com mode : random pick detail : https://leetcode.com/problems/most frequent subtree sum/ degree : Me 阅读全文
posted @ 2018-11-26 11:38 gege4105 阅读(142) 评论(0) 推荐(0)
摘要:Find Eventual Safe States from : https://leetcode.com/ mode : random pick detail : https://leetcode.com/problems/find eventual safe states/ degree : M 阅读全文
posted @ 2018-11-23 10:34 gege4105 阅读(146) 评论(0) 推荐(0)
摘要:From: https://leetcode.com/ mode: random pick degree: Medium We have a string S of lowercase letters, and an integer array shifts. Call the shift of a 阅读全文
posted @ 2018-11-19 14:13 gege4105 阅读(177) 评论(0) 推荐(0)
摘要:From: https://leetcode.com/ mode: random pick Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite res 阅读全文
posted @ 2018-11-14 14:58 gege4105 阅读(140) 评论(0) 推荐(0)