Driver code
public static void main ( String [ ] args ) { int a [ ] = { 1 , 101 , 2 , 3 , 100 , 4 , 5 } ; int n = a . length ; int index = 4 , k = 6 ; System . out . println ( pre_compute ( a , n , index , k ) ) ; } }