static Node getDeepestLeftLeafNode ( Node root ) {
  if ( root == null ) return null ;
  Queue < Node > q = new LinkedList < > ( ) ;
  q . add ( root ) ;
  Node result = null ;
  while ( ! q . isEmpty ( ) ) {
    Node temp = q . peek ( ) ;
    q . remove ( ) ;
    if ( temp . left != null ) {
      q . add ( temp . left ) ;
      if ( temp . left . left == null && temp . left . right == null ) result = temp . left ;
    }
    if ( temp . right != null ) q . add ( temp . right ) ;
  }
  return result ;
}

static Node getDeepestLeftLeafNode ( Node root ) { if ( root == null ) return null ; Queue < Node > q = new LinkedList < > ( ) ; q . add ( root ) ; Node result = null ; while ( ! q . isEmpty ( ) ) { Node temp = q . peek ( ) ; q . remove ( ) ; if ( temp . left != null ) { q . add ( temp . left ) ; if ( temp . left . left == null && temp . left . right == null ) result = temp . left ; } if ( temp . right != null ) q . add ( temp . right ) ; } return result ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (null_literal))) consequence: (return_statement (null_literal))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments)) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (null_literal))) (while_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) (if_statement condition: (parenthesized_expression (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (null_literal))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) right: (null_literal)) right: (binary_expression left: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) right: (null_literal)))) consequence: (expression_statement (assignment_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (null_literal))) consequence: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))))) (return_statement (identifier))))