solution for the problem of unique paths