Refactored all solutions

This commit is contained in:
rshaghoulian
2017-04-05 18:42:35 -05:00
parent 5f4c2f4a78
commit decc8e791e
135 changed files with 848 additions and 849 deletions
@@ -13,7 +13,7 @@
void decode(String str, Node root) {
Node n = root;
for (int i = 0; i < str.length(); i++) {
n = str.charAt(i) == '0' ? n.left : n.right;
n = (str.charAt(i) == '0') ? n.left : n.right;
if (n.left == null && n.right == null) {
System.out.print(n.data);
n = root;