Nagarro Interview Question

Linked list cycle, string permutations