Driver code
public static void main ( String [ ] args ) { String str = " abcdeca " ; int k = 2 ; if ( isKPal ( str , k ) ) { System . out . println ( " Yes " ) ; } else System . out . println ( " No " ) ; } }