master
ehlxr 2022-05-23 16:48:35 +08:00
parent dc5d8f0dfd
commit f588b88700
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@ func Reverse(root *ListNode) *ListNode {
return pre
}
/* 递归反转链表 */
func ReverseRec(root *ListNode) *ListNode {
if root == nil || root.Next == nil {
return root