Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Reverse ¶
func Reverse(list *slist) *slist
the list: head->1->2
before 1 iteration:
current=1 pre=nil next=nil 1.next=2
after 1 iteration:
current=2 pre=1 next=2 1.next=nil
after 2 iteration:
current=nil pre=2 next=nil 2.next=1
func ReverseInStack ¶
func ReverseInStack(list *slist) *slist
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.