Problem – Unique Paths II LeetCode Solution. You are given an m x n integer array grid.There is a robot initially located at the top-left corner (i.e., grid[0][0]).The robot tries to move to the bottom-right corner (i.e., grid[m-1][n-1]).The robot can only move either down or.