摘要:
题目如下: 解题思路:这题看起来和【leetcode】448. Find All Numbers Disappeared in an Array很相似,但是有几点不同:一是本题的输入存在负数,二是没有约定输入元素的最大值。那么,怎么可以把本题转换成448题的场景呢?首先,我们可以求出输入数组nums 阅读全文
摘要:
题目如下: Given an array of characters, compress it in-place. The length after compression must always be smaller than or equal to the original array. Eve 阅读全文