Skip to content

Commit 2c8dafc

Browse files
Change HuffmanCoding class to final
1 parent 785cd10 commit 2c8dafc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/com/thealgorithms/greedyalgorithms/HuffmanCoding.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ public int compareTo(HuffmanNode other) {
1717
}
1818
}
1919

20-
public class HuffmanCoding {
20+
public final class HuffmanCoding {
2121

2222
private static Map<Character, String> huffmanCodes = new HashMap<>();
2323
private static HuffmanNode root;
24-
25-
private HuffmanCoding() {
24+
private HuffmanCoding() {
2625
throw new UnsupportedOperationException("Utility class");
2726
}
2827
/**

0 commit comments

Comments
 (0)