Leetcode 3618. Split Array by Prime Indices
Partition the array into two sums based on whether an element's 0-based index is a prime number, and return the absolute difference |sum(prime-index elements) - sum(other elements)|; the main challenge is efficiently identifying prime indices up to nā1 (n ⤠1e5).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.