Reverse Alternate K Nodes in a Singly Linked List
Given a singly linked list and an integer 'k' reverse every 'k' element.
We'll cover the following...
Statement
Given a singly linked list and an integer k
, write a function to reverse every k
element.
- If , then the input list is unchanged.
- If
Access this course and 1400+ top-rated courses and projects.