Utility function to count N digit numbers with digit i not appearing more than max_digit [ i ] consecutively
int findCountUtil ( int N , int maxDigit [ ] , int position = 0 , int previous = 0 , int count = 1 ) {