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