将链表中m-n范围内的数进行倒序
生活随笔
收集整理的這篇文章主要介紹了
将链表中m-n范围内的数进行倒序
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Reverse a linked list from position?m?to?n. Do it in-place and in one-pass.
For example:
Given?1->2->3->4->5->NULL,?m?= 2 and?n?= 4,
return?1->4->3->2->5->NULL.
Note:
Given?m,?n?satisfy the following condition:
1 ≤?m?≤?n?≤ length of list.
轉載于:https://www.cnblogs.com/yangscode/p/5031168.html
總結
以上是生活随笔為你收集整理的将链表中m-n范围内的数进行倒序的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python语法笔记(四)
- 下一篇: 女人梦到老鼠是什么意思周公解梦