finir le sprint 3

This commit is contained in:
AlgaLaptop
2026-01-04 18:05:46 +01:00
parent bceb70c052
commit 182cd2bd28
10 changed files with 163 additions and 118 deletions
@@ -167,36 +167,6 @@ public class HuffmanTree {
generateCodesRec(node.getLeft(), prefiixe + "0");
// On va a droite en ajoutant "1" au code
generateCodesRec(node.getRight(), prefiixe + "1");
// this.codes = new HashMap<>();
// this.chaineCarac = new String();
// if(root.isLeaf()){
// codes.put(root.getValue(),Integer.parseInt(chaineCarac));
// return codes;
// }
// HuffmanNode temp = root;
// if (root.getLeft() != null) {
// root = root.getLeft();
// chaineCarac = chaineCarac + "0";
// generateCodes();
// // on retire le dernier bit lorsqu'on remonte car sinon les codes seront faussés
// chaineCarac = chaineCarac.substring(0, chaineCarac.length() - 1);
// }
// if (temp.getRight() != null) {
// root = temp.getRight();
// chaineCarac = chaineCarac + "1";
// generateCodes();
// chaineCarac = chaineCarac.substring(0, chaineCarac.length() - 1);
// }
// root = temp;
// return codes;
}
/**