Write a program to swap the kth node from the beginning and the kth node from the end of a singly linked list in one pass. You are not given the length of the linked list beforehand.

AnswerBot
2y
Swap kth and kth to last element of a singly linked list in one pass without knowing the length of the list.
Traverse the linked list using two pointers, one starting from the head and the other starti...read more
Help your peers!
Add answer anonymously...
Akamai Technologies Software Engineer interview questions & answers
A Software Engineer was asked Q. Given a String, find the lexicographically lowest substring containing k number ...read more
A Software Engineer was asked Q. Write a program to reverse a singly linked list, both recursively and iterativel...read more
A Software Engineer was asked Q. Given a string s, find the length of the longest substring without repeating cha...read more
Popular interview questions of Software Engineer
A Software Engineer was asked Q1. Given a String, find the lexicographically lowest substring containing k number ...read more
A Software Engineer was asked Q2. Solve SQL Questions based on Join and group by.
A Software Engineer was asked Q3. Write a program to reverse a singly linked list, both recursively and iterativel...read more
>
Akamai Technologies Software Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

