static void Main(string[] args) { string input = "Yesterday, all my troubles seemed so far away " + "Now it looks as though they're here to stay " + "Oh, I believe in yesterday " + "Suddenly, I'm not half the man I used to be " + "There's a shadow hanging over me " + "Oh, yesterday came suddenly " + "Why she had to go I don't know she wouldn't say " + "I said something wrong, now I long for yesterday " + "Yesterday, love was such an easy game to play " + "Now I need a place to hide away " + "Oh, I believe in yesterday " + "Why she had to go I don't know she wouldn't say " + "I said something wrong, now I long for yesterday " + "Yesterday, love was such an easy game to play " + "Now I need a place to hide away " + "Oh, I believe in yesterday " + "Mm mm mm mm mm mm mm"; HuffmanTree hTree = new HuffmanTree(); hTree.Build(input);
public HuffmanTree(char symbol) { this.left = null; this.right = null; this.symbol = symbol; }
public HuffmanTree(HuffmanTree left, HuffmanTree right) { this.left = left; this.right = right; this.symbol = null; }
private void SetDefaultPropertiesValues() { HuffmanCodeTree = new HuffmanTree(); }