leetcode.com/problems/product-of-array-except-self/
Product of Array Except Self - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
문제 풀이 방식
1. 왼쪽으로 탐색하면서 곱하기 배열을 만듬.
2. 오른쪽으로 탐색하면서 곱하기 배열을 만듬.
3. 왼쪽과 오른쪽의 연산 결과를 곱한다.
주의할 점
첫번째와 마지막 인덱스를 혼동할 수 있으므로 정확하게 노트에 풀어보기.
소스코드
'Leetcode 100문제 도전' 카테고리의 다른 글
[Leetcode 27/100] Clone Graph - Medium (0) | 2021.01.24 |
---|---|
[Leetcode 26/100] Number of Islands - Medium (0) | 2021.01.24 |
[Leetcode 24/100] Palindromic Substrings - Medium (0) | 2021.01.21 |
[Leetcode 23/100] Palindrome Linked List - Easy (0) | 2021.01.21 |
[Leetcode 22/100] Top K Frequent Elements - Medium (0) | 2021.01.21 |