The description uses terminology like
num[i] ? num[i+1]
num[-1] = num[n] = -?
What does it mean, though? I've never seen '?' used in this context, only with if-else segments that also contain a colon. And won't num[-1] cause an array out of bounds exception? Looking at how everyone has the same(ish) solution, there must be something I'm missing here. If someone can describe what it is, I'd really appreciate it. Thanks!
It means the characters somehow got screwed up. Used to be correct: