What if array given is not sorted

what will happen if given array here was unsorted and we were asked to find subarray? do we have to sort them first

hi @uditmudgal07_2f40cca755bd8bd2,
no u dont have to sort them