revnopointer.txt

来自「It is an ebook about data structures,mai」· 文本 代码 · 共 11 行

TXT
11
字号
How do you reverse a linked list without using any C pointers? 

Discuss it!          


One way is to reverse the data in the nodes without changing the pointers themselves. One can also create a new linked list which is the reverse of the original linked list. A simple C program can do that for you. Please note that you would still use the "next" pointer fields to traverse through the linked list (So in effect, you are using the pointers, but you are not changing them when reversing the linked list). 



 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?