Size of the array for which this method will work

sir will this method will work if the size of the array is 100 .

hello @luckypavan

see it has exponentional time complexity
so it will for all value of n where this satisfies 2^n < 10^8