Function to find the number of occurrences of a character at position P upto p - 1
static int countOccurrence ( String s , int position ) { int [ ] alpha = new int [ 26 ] ; int [ ] b = new int [ s . Length ] ;