@@ -0,0 +1,674 @@
+//https://www.hackerrank.com/challenges/tree-huffman-decoding%0A%0A/* You only have to complete the function given below.%0A    class Node %7B%0A        int freq;%0A        char data;%0A        Node left;%0A        Node right;%0A    %7D%0A*/%0A%0Avoid decode(String S, Node root)%7B%0A    %0A    //Sanitize inputs%0A    if(root == null %7C%7C S == null)%7B%0A        return;%0A    %7D%0A    %0A    //Decode%0A    Node node = root;%0A    final StringBuilder sb = new StringBuilder();%0A    for(char c : S.toCharArray())%7B%0A        node = (c == '0') ? node.left : node.right;%0A        if(node.data != '%5C0')%7B%0A            sb.append(node.data);%0A            node = root;%0A        %7D%0A    %7D%0A    %0A    //Print output%0A    System.out.print(sb);%0A%7D%0A

Create tree-huffman-decoding.java