Driver code
int main ( ) { ll a [ ] = { 1 , 101 , 2 , 3 , 100 , 4 , 5 } ; ll n = sizeof ( a ) / sizeof ( a [ 0 ] ) ; ll index = 4 , k = 6 ; printf ( " % lld " , pre_compute ( a , n , index , k ) ) ; return 0 ; }