code: private static int flipArray(char [] dest, int start, int e, int w){
          int r;
          if (w > start) {
          // shift, assume small buffer size so don't use arraycopy
            r = w;
            w = start;
            while (r < e) {
              dest[w++] = dest[r++];
             }
           } else {
               w = e;
           }
          return w;
        }
docs: /*
  Name    : flipArray
  Function: inverts array, so that start becomes end and vice versa