A regular interview questions: Reverse singly linked list

A regular interview questions: Reverse singly linked list

Title: Enter a list, the inverted list, the new list of the output header.

Thinking

Here Insert Picture Description
[Principle]: disconnect the head of the list, followed by the node into the former head of the list
[of code]: python
Here Insert Picture Description

Released two original articles · won praise 2 · Views 490

Guess you like

Origin blog.csdn.net/weixin_40981751/article/details/103987321