TapeEquilibrium
-
시간복잡도를 고려한 알고리즘 (3)Algorithm 2021. 7. 11. 13:50
아래 문제는 코딜리티에서 제공하는 TapeEquilibrium의 문제입니다🧑🏻💻 문제 제시 A non-empty array A consisting of N integers is given. Array A represents numbers on a tape. Any integer P, such that 0 < P < N, splits this tape into two non-empty parts: A[0], A[1], ..., A[P − 1] and A[P], A[P + 1], ..., A[N − 1]. The difference between the two parts is the value of: |(A[0] + A[1] + ... + A[P − 1]) − (A[P] + A[P + 1] + ... + ..