Function to count maximum occurring subsequence using only those characters whose indexes are in GP
static int findMaxTimes ( String S ) { int [ ] arr = new int [ 26 ] ; int [ , ] dp = new int [ 26 , 26 ] ;