LeadSquared interview question

Reverse linked list in chunks