From fa4f1ac0af8077bb80f05280343c25ea6a4b6771 Mon Sep 17 00:00:00 2001 From: Drew Cuthbertson Date: Thu, 22 Oct 2015 15:18:50 -0700 Subject: [PATCH] Use src/huffman.js in demo --- Demo.html | 89 ++------------------------------------------------ src/huffman.js | 5 +-- 2 files changed, 5 insertions(+), 89 deletions(-) diff --git a/Demo.html b/Demo.html index f42cf6a..1ede3a5 100644 --- a/Demo.html +++ b/Demo.html @@ -4,6 +4,7 @@ +
@@ -107,92 +108,6 @@

Efficiency:

} - \ No newline at end of file + diff --git a/src/huffman.js b/src/huffman.js index 6205c60..5e29956 100644 --- a/src/huffman.js +++ b/src/huffman.js @@ -1,13 +1,13 @@ // // Given a Huffman tree and a string, encode that string into a new string // // consisting only of 1s and 0s, using the code given by the tree. var encodeString = function(input, huffmanTree) { - return ""; + return "Not implemented yet!"; }; // // Given a Huffman tree and a string of 1s and 0s, decode that string into // // a new, human-readable string, using the code given by the tree. var decodeString = function(input, huffmanTree) { - return ""; + return "Not implemented yet!"; }; // Given a corpus of text, return a Huffman tree that represents the @@ -22,6 +22,7 @@ var decodeString = function(input, huffmanTree) { // You may also use the `Tree` class that is provided in the file `misc.js` // Some corpuses are included as the variables `lorumIpsum` and `declaration`. var makeHuffmanTree = function(corpus) { + alert("You must implement makeHuffmanTree first!") return new Tree(); };