Linked List
2130. Maximum Twin Sum of a Linked List
Singly-linked list of even length n. "Twins" are nodes at indices i and n−1−i (0-indexed). Find the maximum twin sum val[i] + val[n−1−i]. Pair symmetric elements from the ends and take the max sum.
Loading…