/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode(int x) { val = x; }
 * }
 */
public class Solution {
    public int sumOfLeftLeaves(TreeNode root) {
        if (root == null) return 0;
        int result = sumOfLeftLeaves(root.right);

        if (root.left != null) {
            if (root.left.left == null && root.left.right == null) {
                result += root.left.val;
            }
            else {
                result += sumOfLeftLeaves(root.left);
            }
        }

        return result;
    }
}

@@ -279,58 +279,8 @@
 n 0;
-%0A        int result = sumOfLeftLeaves(root.right);
 %0A%0A  
@@ -310,26 +310,11 @@
 null
-) %7B%0A            if
+ &&
  (ro
@@ -361,16 +361,17 @@
 == null)
+)
  %7B%0A     
@@ -377,29 +377,52 @@
         
-    result
+return sumOfLeftLeaves(root.right)
  +
-=
  root.le
@@ -441,133 +441,83 @@
     
- 
-   %7D%0A            else %7B%0A                result += sumOfLeftLeaves(root.left);%0A            %7D%0A        %7D%0A%0A        return result
+%7D%0A%0A        return  sumOfLeftLeaves(root.right) + sumOfLeftLeaves(root.left)
 ;%0A  

refactor #404