![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
记录LeetCode解题思路和方法
zgkdwx
这个作者很懒,什么都没留下…
展开
-
917. Reverse Only Letters
Given a string S, return the "reversed" string where all characters that are not a letterstay in the same place, and all letters reverse their positions.Example 1:Input: "ab-cd"Output: "dc-ba"Example 2:Input: "a-bC-dEf-ghIj"Output: "j-Ih-g..原创 2020-05-23 22:51:50 · 146 阅读 · 0 评论 -
443. String Compression
Given an array of characters, compress it in-place.The length after compression must always be smaller than or equal to the original array.Every element of the array should be a character (not int) of length 1.After you are done modifying the input a原创 2020-05-13 23:07:08 · 118 阅读 · 0 评论 -
628. Maximum Product of Three Numbers
Given an integer array, find three numbers whose product is maximum and output the maximum product.Example 1:Input: [1,2,3]Output: 6Example 2:Input: [1,2,3,4]Output: 24Note:The length of the given array will be in range [3,104] and ..原创 2020-05-10 14:34:41 · 125 阅读 · 0 评论 -
605. Can Place Flowers
605. Can Place FlowersEasySuppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be planted in adjacent plots - they would compete for water and both would die.Given a flowerbed (represented原创 2020-05-10 11:59:10 · 153 阅读 · 0 评论