You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The original version of this problem statement had an error in the 2nd example input.
Written as:
Given the linked list 1 -> 2 -> 3 -> 4 -> 5 and k = 3, it should become 3 -> 4 -> 5 -> 1 -> 2.
Should be:
Given the linked list 1 -> 2 -> 3 -> 4 -> 5 and k = 3, it should become 4 -> 5 -> 1 -> 2 -> 3.
Good morning! Here's your coding interview problem for today.
This problem was asked by Airbnb.
Given a linked list and a positive integer
k
, rotate the list to the right byk
places.For example, given the linked list
7 -> 7 -> 3 -> 5
andk = 2
, it should become3 -> 5 -> 7 -> 7
.Given the linked list
1 -> 2 -> 3 -> 4 -> 5
andk = 3
, it should become4 -> 5 -> 1 -> 2 -> 3
.The text was updated successfully, but these errors were encountered: