생각의 표현들

LeetCode

[LeetCode] 169. Majority Element

Majority Element - LeetCode Can you solve this real interview question? Majority Element - Given an array nums of size n, return the majority element. The majority element is the element that appears more than ⌊n / 2⌋ times. You may assume that the majority element always exists leetcode.com 크기가 n인 int배열 이 주어지면 majority element를 반환합니다. majority element는 ⌊n / 2⌋ 이상 나타나는 요소입니다. majority element가 항..

LeetCode

[LeetCode] 80. Remove Duplicates from Sorted Array II

Remove Duplicates from Sorted Array II - LeetCode Can you solve this real interview question? Remove Duplicates from Sorted Array II - Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place [https://en.wikipedia.org/wiki/In-place_algorithm] such that each unique elemen leetcode.com int 배열이 주어지면 최대 2개까지의 중복만 허용하여 배열을 재구성하는 문제입니다. 추가적인 메모리 할당은 O(1)만 허용됩니다. 입출력 ..

LeetCode

[LeetCode] 26 Remove Duplicates from Sorted Array

Remove Duplicates from Sorted Array - LeetCode Can you solve this real interview question? Remove Duplicates from Sorted Array - Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place [https://en.wikipedia.org/wiki/In-place_algorithm] such that each unique element ap leetcode.com 주어진 int형 배열에 중복값을 제거하여 반환하는 문제입니다. 중복이 제거된 배열의 길이를 리턴하고 원본 배열에는 순서대로 중복 제거된 데이터가 ..

LeetCode

[LeetCode] 27. Remove Element

Remove Element - LeetCode Can you solve this real interview question? Remove Element - Given an integer array nums and an integer val, remove all occurrences of val in nums in-place [https://en.wikipedia.org/wiki/In-place_algorithm]. The order of the elements may be changed. Then r leetcode.com array nums와 val이 주어지면 int형 array 안에val과 같은 값이 있으면 제거하고 array에 남은 값들만 반환하면 됩니다. 이때 남은 값든의 숫자를 반환하고 주어진 ..

Sol b
'분류 전체보기' 카테고리의 글 목록 (22 Page)