Question d’entretien chez WNS

Medium level leetcode question on linked list and tree