OSCHINA 社区最新专区文章 |
Posted: 24 Dec 2021 09:18 PM PST 给定一个单链表 L 的头节点 head ,单链表 L 表示为: L0 → L1 → … → Ln - 1 → Ln 请将其重新排列后变为: L0 → Ln → L1 → Ln - 1 → L2 → Ln - 2 → … 此题可分为三步解决, 1.首先找到中间节点: 找中间节点时,找到中间节点的前一项,将此项的下一项定义为中间节点,然后将此项的next指向null, 这样将整个... |
You are subscribed to email updates from OSCHINA 社区最新专区文章. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment