- 博客(2)
- 收藏
- 关注
原创 Python去除字符串中连续重复的单词
如果一个字符串中的单词存在连续重复的部分,那么删除这一部分,得到新的字符串。比如下面这个字符串:“”“my friend’s new new newnew and old old catsare runningrunning in the street.”""删减后得到:my friend’s new and old cats are running in the street.方式一:original_str = """my friend's new new newnew and ol
2021-08-22 22:18:15 4222
原创 989. 数组形式的整数加法
989. 数组形式的整数加法对于非负整数 X 而言,X 的数组形式是每位数字按从左到右的顺序形成的数组。例如,如果 X = 1231,那么其数组形式为 [1,2,3,1]。给定非负整数 X 的数组形式 A,返回整数 X+K 的数组形式。来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/add-to-array-form-of-integer著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。class Solution1:
2021-02-02 17:52:15 81
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人