Hi there,
I can’t wrap my head around this problem. After seeing the solution, I kind understand why it would work but only for specific input (e.g rotated arrays). For an unsorted array like arr = [0, 40, 50, 10, 20], by applying the solution the return value it’s still 3 which is not.
Does someone have any answer related to this?
Thank you