In the spirit of fresh starts that often come with the New Year, here's a problem to warm up your coding muscles. Given an array of integers and a target sum, your task is to determine if there is any continuous subarray whose sum exactly equals the target. If such a subarray exists, return the 0-indexed starting and ending positions; otherwise, return [-1, -1].
For the array: [1, 2, 3, 4, 5] and target = 9, one valid answer is [1, 3], since 2 + 3 + 4 = 9.
Below is some starter code in various languages. Complete the function to solve the problem by leveraging the prefix sum strategy.