leetcode.com/problems/maximum-twin-sum-of-a-linked-list/editorial/
1 Users
0 Comments
1 Highlights
0 Notes
Tags
Top Highlights
We need three pointers: a) nextNode, to hold the next node so that when we reverse the next pointer of the previous node, we have access to the next node, b) slow, the node under consideration whose next must be set to the previous node, and c) prev, the previous node.
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.