๐งฉ The Problem: Given a singly linked list, rotate it to the right by k nodes. Example: If the list is 1 โ 2 โ 3 โ 4 โ 5 โ NULLand k = 2 then,rotate 1: 5 โ 1 โ 2 โ 3 โ 4 โ NULL rotate 2: 4 โ 5 โ 1 โ 2 โ 3 โ NULL the rotated list becomes( final output...
climbing-leetcode.hashnode.dev3 min read
No responses yet.