Swapping Nodes in Linked List | Smart Interviews

Опубликовано: 11 Март 2026
на канале: Smart Interviews
850
4

How to Swap Nodes in Linked List? | Smart Sessions - Smart Interviews

Description: In this video, our instructor Devi Prasad Joshi explains about swapping nodes in a linked list. To understand how its done, watch the full video.

Here’s the problem statement

You are given the head of a linked list, and an integer k. Return the head of the linked list after swapping the values of the kth node from the beginning and the kth node from the end (the list is 1-indexed).

Problem link: https://leetcode.com/problems/swappin...

#leetcodequestionandanswers #linkedlist #smartinterviews

---------------------------------------------------------------------------------------------------------------
About Smart Interviews

Welcome to Smart Interviews!! We are an ed-tech platform transforming lives of Engineering students since 2016. Our mission is to upskill every Engineering graduate around the country to help them build a future of their dreams.

We are proud to have upskilled over 25000 students. Additionally 18000+ students have been placed in top tech companies. Join us to build your tech career today!

Find more about our journey and course on our website: https://bit.ly/47cTiNr
-----------------------------------------------------------------------------------------------------------------------------------
Connect with us

LinkedIn - https://bit.ly/49Faf52
Instagram - https://bit.ly/3sKlf05
Discord - https://bit.ly/40DTiUc
Facebook - https://bit.ly/3SIaF4g