LeetCode

    [LeetCode/릿코드] - 238. Product of Array Except Self (Medium/미디엄)

    [LeetCode/릿코드] - 238. Product of Array Except Self (Medium/미디엄)

    238. Product of Array Except Self 문제: Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. The product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer. You must write an algorithm that runs in O(n) time and without using the division operation. 문제 해설: 1. 정수 숫자 배열이 주어진다. 2. 자기 자신을 제외한 모..

    [LeetCode/릿코드] - 41. First Missing Positive - (Hard/하드)

    엊그제, 미국 도착!! 폰 개통하고, 계좌 오픈하고, 화이자 맞고! 이제 부지런히 문제 풀어야지... 오늘 부터 던킨 도넛에서 아침 먹으면서 문제 풀기 시작! Hard 문제인데, 문제 해석은, 빼먹은 양의 정수중 가장 작은 숫자를 반환하면 되는 문제! Given an unsorted integer array nums, find the smallest missing positive integer. You must implement an algorithm that runs in O(n) time and uses constant extra space. Example 1: Input: nums = [1,2,0] Output: 3 Example 2: Input: nums = [3,4,-1,1] Output: 2 ..