Function to return the minimum distinct powers of 2 required to express s
static void findMinimum ( String s ) { int n = s . Length ; int [ ] x = new int [ n + 1 ] ; StringBuilder s2 = new StringBuilder ( s ) ;