Bug Report for https://neetcode.io/problems/clone-graph
Submitting an incomplete C++ solution that only contains a nullptr check for the empty graph case gets marked as Accepted and passes all 18 test cases.
Here's the code to reproduce the bug:
class Solution {
public:
Node* cloneGraph(Node* node) {
if (node == nullptr) return nullptr;
}
};
The submission should fail with a Wrong Answer, Segmentation Fault, or Runtime Error when evaluated against non-empty graph inputs. But the judge marks the submission as Accepted.
Bug Report for https://neetcode.io/problems/clone-graph
Submitting an incomplete C++ solution that only contains a nullptr check for the empty graph case gets marked as Accepted and passes all 18 test cases.
Here's the code to reproduce the bug:
The submission should fail with a Wrong Answer, Segmentation Fault, or Runtime Error when evaluated against non-empty graph inputs. But the judge marks the submission as Accepted.