Intuit Interview Question

Dsa question Focused on graphs