static void findPathUtil ( Node root , int k , Vector < Integer > path , int flag ) {
  if ( root == null ) return ;
  if ( root . data >= k ) flag = 1 ;
  if ( root . left == null && root . right == null ) {
    if ( flag == 1 ) {
      ans = 1 ;
      System . out . print ( "(" ) ;
      for ( int i = 0 ;
      i < path . size ( ) ;
      i ++ ) {
        System . out . print ( path . get ( i ) + ", " ) ;
      }
      System . out . print ( root . data + "), " ) ;
    }
    return ;
  }
  path . add ( root . data ) ;
  findPathUtil ( root . left , k , path , flag ) ;
  findPathUtil ( root . right , k , path , flag ) ;
  path . remove ( path . size ( ) - 1 ) ;
}

static void findPathUtil ( Node root , int k , Vector < Integer > path , int flag ) { if ( root == null ) return ; if ( root . data >= k ) flag = 1 ; if ( root . left == null && root . right == null ) { if ( flag == 1 ) { ans = 1 ; System . out . print ( " ( " ) ; for ( int i = 0 ; i < path . size ( ) ; i ++ ) { System . out . print ( path . get ( i ) + " , ▁ " ) ; } System . out . print ( root . data + " ) , ▁ " ) ; } return ; } path . add ( root . data ) ; findPathUtil ( root . left , k , path , flag ) ; findPathUtil ( root . right , k , path , flag ) ; path . remove ( path . size ( ) - 1 ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (null_literal))) consequence: (return_statement)) (if_statement condition: (parenthesized_expression (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (identifier))) consequence: (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (null_literal)) right: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (null_literal)))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) update: (update_expression (identifier)) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (string_literal))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (string_literal))))))) (return_statement))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier))))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)) (identifier) (identifier) (identifier)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)) (identifier) (identifier) (identifier)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)))))))