@@ -0,0 +1,1061 @@
+/*  %0A   class Node%0A      public  int frequency; // the frequency of this tree%0A       public  char data;%0A       public  Node left, right;%0A    %0A*/ %0A%0Avoid decode(String S ,Node root)%0A    %7B%0A        String%5B%5D chars = S.split(%22(?!%5E)%22);%0A        String finalString = %22%22;%0A        int left = 0;%0A        String currChar = chars%5Bleft%5D;%0A        int right = chars.length - 1;%0A        Node temp = null;%0A        boolean toStop = false;%0A        while (left %3C= right && !toStop)%7B%0A            temp = root;%0A            while (temp.left != null && temp.right != null)%7B%0A                if (currChar.equalsIgnoreCase(%221%22))%7B%0A                    temp = temp.right;%0A                %7D%0A                else%7B%0A                    temp = temp.left;%0A                %7D%0A                if (left != right)%7B%0A                    left++;    %0A                %7D%0A                else%7B%0A                    toStop = true;%0A                %7D%0A                currChar = chars%5Bleft%5D;%0A            %7D%0A            finalString += String.valueOf(temp.data);%0A        %7D%0A        System.out.println(finalString);%0A    %7D%0A

Create decodeHuffmanTree.java