pre - calculation of all combinations
combi ( 100 , 100 ) ; long arr [ ] = { 1 , 2 , 3 , 4 } ; int n = arr . length ; int k = 3 ; long ans = product ( arr , n , k ) ; System . out . println ( ans ) ; } }