Java 100% Faster Simple Solution
Success\nRuntime: 0 ms, faster than 100.00% of Java online submissions for Unique Paths II.\nMemory Usage: 38.5 MB, less than 90.77% of Java online submissions 
#### Success\n**Runtime: 0 ms, faster than 100.00% of Java online submissions for Unique Paths II.\nMemory Usage: 38.5 MB, less than 90.77% of Java online submissions for Unique Paths II.**\n\n```\n\nclass Solution{\n    public int uniquePathsWithObstacles(int[][] arr) \n\t{\n        if(arr == null || arr.length == 0) \n\t\t\treturn 0;\n        for(int i = 0 ; i < arr.length; i++){\n            for(int j = 0; j < arr[0].length; j++){\n                arr[i][j] ^= 1;\n                if(arr[i][j] == 1){\n                    if(i == 0 && j != 0)\n                        arr[i][j] = arr[i][j-1];\n                    if(i != 0 && j == 0)\n                        arr[i][j] = arr[i-1][j];\n                    if(i != 0 && j != 0)\n                        arr[i][j] = arr[i-1][j] + arr[i][j-1];\n                }   \n            }\n        } \n        return arr[arr.length - 1][arr[0].length - 1]; \n    }\n}\n```
['Java']