Example 1: Input: nums = [1,1,0,1,1,1] Output: 3 Explanation: The first two digits or the last three digits are consecutive 1s. The maximum number of
Given an array nums of integers, return how many of them contain an even number of digits.Example 1:Input: nums = 12,345,2,6,7896Output: 2Explanation:
Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order. Example 1: > Input: nums = [-4,-1,0,3,10] Output: [0,1,9,16,...
Given a fixed-length integer array arr, duplicate each occurrence of zero, shifting the remaining elements to the right. Note that elements beyond the length of the original array are not written. Do...
주어진 nums 에서 val 원소를 지우는 문제nums 인덱스 요소를 변화시키고, 리턴 값은 배열의 길이
정수 배열이 주어졌을 때 , i와 j두 개의 인덱스 가 arr존재하는지 확인합니다.i != j0 <= i, j < arr.lengtharri == 2 \* arrj1\. 해시셋 사용:set이라는 해시셋을 사용하여 배열을 순회하면서 각 숫자를 기록합니다.현재