You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 节点对象functionlistNode(val){this.val=val;this.next=null;}// head = new ListNode(x)functionremoveNode(head,target){if(head===null){returnnull;}head.next=removeNode(head.next,target);returnhead.val===target ? head.next : head;}
The text was updated successfully, but these errors were encountered:
删除链表中等于给定值
val
的所有节点。示例:
解答
The text was updated successfully, but these errors were encountered: