Solved! Leetcode 1669. Merge In Between Linked Lists

Table of ContentsMerge In Between Linked ListsDescriptionExample 1Example 2ConstraintsApproachSolution Merge In Between Linked Lists Description You are given two linked lists: list1 and list2 of sizes n and m respectively. Remove list1‘s nodes from the ath node to the bth node, and put list2 in their place. The blue edges and nodes in the following figure indicate the result: Build the result list and return its head. Example 1 <strong>Input:</strong> ...

Solved! Leetcode 2130. Maximum Twin Sum of a Linked List

source: https://leetcode.com/problems/maximum-twin-sum-of-a-linked-list/description/ Maximum Twin Sum of a Linked List In a linked list of size n, where n is even, the ith node (0-indexed) of the linked list is known as the twin of the (n-1-i)th node, if 0 <= i <= (n / 2) – 1. For example, if n = 4, then node ...

Solved! Leetcode 369. Plus One Linked List

source: https://leetcode.com/problems/plus-one-linked-list/description/ Plus One Linked List Given a non-negative integer represented as a linked list of digits, plus one to the integer. The digits are stored such that the most significant digit is at the head of the list. Example 1: Input: head = [1,2,3] Output: [1,2,4] Example 2: Input: head = [0] Output: [1] ...