TypechoJoeTheme

IT技术分享

统计

[LeetCode 92] Reverse Linked List II [Java]

2018-03-29
/
0 评论
/
723 阅读
/
正在检测是否收录...
03/29

1. Description

Reverse a linked list from position m to n. Do it in-place and in one-pass.

Note:
Given m, n satisfy the following condition:
1 ≤ m ≤ n ≤ length of list.

2. Example

Given 1->2->3->4->5->NULL, m = 2 and n = 4,

return 1->4->3->2->5->NULL.

3. Code

Linked
朗读
赞 · 0
版权属于:

IT技术分享

本文链接:

https://idunso.com/archives/1494/(转载时请注明本文出处及文章链接)