I ran into this issue when trying the test case provided on the question, if you're like me where you usually copy paste the example as a test case and then clicking run code, you'll run into this.
Firstly u\u2212 is a Minus sign in Unicode.
Turns out the example case used Unicode minus signs.
Notice how the example,
[−2,1,−3,4,−1,2,1,−5,4] differs with
[-2,1,-3,4,-1,2,1,-5,4], the signs are longer.
Posting this here in hopes of helping people figure it out since I thought it was something wrong with my code.