Given the head of a singly linked list and an integer k, swap the kth node from the start with the kth node from the end by relinking nodes (not just copying values), handling boundary cases. Written…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.