static node removeFromLL ( node head ) {
  node curr = head ;
  node prev = head ;
  while ( curr != null && isSpecialChar ( curr . data ) ) {
    node temp = curr ;
    head = curr . next ;
    curr = curr . next ;
    temp = null ;
  }
  prev = head ;
  while ( curr != null ) {
    while ( curr != null && isSpecialChar ( curr . data ) ) {
      node temp = curr ;
      prev . next = curr . next ;
      curr = curr . next ;
      temp = null ;
    }
    if ( curr == null ) break ;
    prev = curr ;
    curr = curr . next ;
  }
  return head ;
}

static node removeFromLL ( node head ) { node curr = head ; node prev = head ; while ( curr != null && isSpecialChar ( curr . data ) ) { node temp = curr ; head = curr . next ; curr = curr . next ; temp = null ; } prev = head ; while ( curr != null ) { while ( curr != null && isSpecialChar ( curr . data ) ) { node temp = curr ; prev . next = curr . next ; curr = curr . next ; temp = null ; } if ( curr == null ) break ; prev = curr ; curr = curr . next ; } return head ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (identifier))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (null_literal)) right: (method_invocation name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (field_access object: (identifier) field: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (field_access object: (identifier) field: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (null_literal))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (null_literal))) body: (block (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (null_literal)) right: (method_invocation name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (identifier))) (expression_statement (assignment_expression left: (field_access object: (identifier) field: (identifier)) right: (field_access object: (identifier) field: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (field_access object: (identifier) field: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (null_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (null_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (field_access object: (identifier) field: (identifier)))))) (return_statement (identifier))))