Skip to content

#2130 - Maximum Twin Sum of a Linked List

MediumLinked List
Open on LeetCode

In a linked list of even length n, node i is the twin of node n - 1 - i. The twin sum is the sum of a node and its twin. Return the maximum twin sum of the linked list.

InputOutput
head = [5,4,2,1]6
head = [4,2,2,3]7
head = [1,100000]100001

Released under the MIT License.