We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Tree: Huffman Decoding
Tree: Huffman Decoding
Sort by
recency
|
528 Discussions
|
Please Login in order to post a comment
this looks broken. there's no stub code, and all of the examples are looking for the same input as the output, so I was able to trivially "solve" this in ruby by doing:
puts gets
I type the following code:
Does this exercise actually makes sense? The Java 15 IDE was giving me the plain string (ABACA) in main args, whilst the question says that you'll get the
s="0110101"
like strings. I ended up with the solution for hoffman encoding instead of the decodingimport java.util.*;
abstract class Node implements Comparable { public int frequency; // the frequency of this tree public char data; public Node left, right; public Node(int freq) { frequency = freq; }
}
class HuffmanLeaf extends Node {
}
class HuffmanNode extends Node {
}
class Decoding {
/*
class Node public int frequency; // the frequency of this tree public char data; public Node left, right;
*/
****************