LeetCode icon indicating copy to clipboard operation
LeetCode copied to clipboard

LeetCode solutions written in Java

Results 4 LeetCode issues
Sort by recently updated
recently updated
newest added

i am getting the below error for https://oj.leetcode.com/problems/copy-list-with-random-pointer/ Input: {-1,-1} Output: Random pointer of node with label -1 points to a node from the original list. Expected: {-1,-1}

1. a typo: class name should be Solution :) 2. There is no need to check "if (numRows

``` Java if (root == null) { return -1; } ``` 应该是 `return 0;`