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
varreverseList=function(head){if(!head.next||!head)returnhead// if console.log will get 1,2,3,4,5constprev=reverseList(head.next)head.next.next=head// if console.log here will get 5,4,3,2,1head.next=nullreturnprev};
反转链表
递归
双指针
The text was updated successfully, but these errors were encountered: