let me make sure I understand the constraints...
My initial thought is we should first check edge cases as they can be easily eliminated.
so here's how i would break down the problem... first.
I'll use a two pointer technique
shoutout to leetcode for providing great critical thinking questions. it's and enticing and ebullient ride.