Problem
Given two linked lists and positions a, b: remove the nodes in positions [a, b] of the first list and splice the entire second list into the gap.
Input / Output
list1, list2; ints a <= b (0-indexed into list1).Constraints
a >= 1 in the classic setting (head survives) — clarify, else use a dummy head.Example