[LeetCode][Kotlin] 448. Find All Numbers Disappeared in an Array
448. Find All Numbers Disappeared in an ArrayGiven an array nums of n integers where nums[i] is in the range [1, n], return an array of all the integers in the range [1, n] that do not appear in nums.nums[i]가 [1, n] 범위에 있는 n개의 정수로 구성된 배열이 주어지면, nums에 나타나지 않는 [1, n] 범위의 모든 정수 배열을 반환합니다. Example 1:Input: nums = [4,3,2,7,8,2,3,1]Output: [5,6] Example 2:Input: nums = [1,1]Output: [2] Constraints:n =..
2024. 8. 16.
[LeetCode][Kotlin] 118. Pascal's Triangle
118. Pascal's TriangleGiven an integer numRows, return the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers directly above it as shown:정수 numRows가 주어지면 Pascal의 삼각형의 첫 번째 numRows를 반환합니다. Pascal의 삼각형에서 각 숫자는 표시된 대로 바로 위에 있는 두 숫자의 합입니다. Example 1:Input: numRows = 5Output: [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]] Example 2:Input: numRows = 1Output..
2024. 8. 13.