Count Reachable Cells

Company: Flipkart_12july

Difficulty: medium