Function to return minimum run - length encoding for string s by removing atmost k characters
public static int MinRunLengthEncoding ( String s , int n , int k ) { for ( int i = 0 ; i < maxN ; i ++ ) for ( int j = 0 ; j < maxN ; j ++ ) for ( int p = 0 ; p < 27 ; p ++ ) for ( int l = 0 ; l < maxN ; l ++ ) dp [ i , j , p , l ] = - 1 ; return solve ( s , n , 0 , k , ( char ) 123 , 0 ) ; }