@Test public void runTest() { assertEquals("110010011101110", Huffman.huffman("bccabdbc", Mode.ENCODE)); }
public static String huffman(String input, Mode mode) { String output = ""; if (mode == Mode.ENCODE) { createList(input); prepareTree(); encode(v.size() - 1); output = code(input); } return output; }
Huffman { public static String huffman(String input, Mode mode) { String output = ""; if (mode == Mode.ENCODE) { createList(input); prepareTree(); encode(v.size() - 1); output = code(input); } return output; } }
Huffman { public static String huffman(String input, Mode mode) { String output = ""; if (mode == Mode.ENCODE) { createList(input); prepareTree(); encode(v.size() - 1); output = code(input); } return output; }  }
Huffman { public static String huffman(String input, Mode mode) { String output = ""; if (mode == Mode.ENCODE) { createList(input); prepareTree(); encode(v.size() - 1); output = code(input); } return output; }  static String huffman(String input, Mode mode); }
Huffman { public static String huffman(String input, Mode mode) { String output = ""; if (mode == Mode.ENCODE) { createList(input); prepareTree(); encode(v.size() - 1); output = code(input); } return output; }  static String huffman(String input, Mode mode);  }