Solution getting accepted with Debug statements but not without them

I ran custom TCs for the following question:
863. All Nodes Distance K in Binary Tree

Issue
I get Failed result. But when I add a debug statement and print something on the STDOUT, the result is Accepted.

Comments (1)