Starbucks Interview Question

Leet Code Easy Problem study those, linked tree