Google Interview Question

Variation of Unique Paths problem