Function to find the minimum number of deletions required to make the occurrences of the given character K continuous
static int noOfDeletions ( String str , char k ) { int ans = 0 , cnt = 0 , pos = 0 ;