← Morgan Stanley questions
CodingReported in a candidate post, Jul 2025

Swap the kth node from the start with the kth from the end

Filed under Morgan Stanley

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.

Related Morgan Stanley questions

Collected from public candidate posts and coding forums. Updated Nov 2026.