public static Node deleteAll(Node front, String target){
if (front == null){ return null;}
if (front.data.equals(target)){
return deleteAll(front.next,target);
}
front.next=deleteAll(front.next,target);
return front;
}
我正在尝试理解这个解决方案,但它让我感到困惑。为什么它不总是结果为null,因为最后front将等于null。