Here you can find the source of minimum(char[] set)
public static char[] minimum(char[] set)
//package com.java2s; //License from project: Apache License public class Main { public static final int ENCODING_LENGTH = 128; public static char[] minimum(char[] set) { // [e, a, d, f, f, c, c, k, \s] -> {a, c, d, e, f, k, \0, \t} boolean[] book = emptyBook(); for (char b : set) { book[b] = true;/*w w w. j a v a2s . co m*/ } return bookToSet(book, true); } private static boolean[] emptyBook() { boolean[] book = new boolean[ENCODING_LENGTH]; for (int i = 0; i < book.length; i++) { book[i] = false; } return book; } private static char[] bookToSet(boolean[] book, boolean persistedFlag) { char[] newSet = new char[ENCODING_LENGTH]; int i = 0; for (char j = 0; j < book.length; j++) { boolean e = book[j]; if (e == persistedFlag) { newSet[i++] = j; } } return newSet; } }