Sir, why we are taking the condition as si==arr.length not as arr.length-1 as we have to triverse the elements only to the maximum index no but arr.length will always give the output as max index+1
The condition of base case
this means we can go till length-1 but as soon as you reach length , it ll break