Getting time limit exceed/stack overflow issues for optimized code submits in C#

So I tried to submit two solutions to two different leetcode problems. Both the times. I keep getting time limit exceeded or out of memory or stack overflow issues.

Please check my account for last two problems I submitted and got error even though the code is correct.

https://leetcode.com/problems/find-root-of-n-ary-tree/submissions/1186061006/

https://leetcode.com/problems/number-of-nodes-in-the-sub-tree-with-the-same-label/submissions/1185961553/

Comments (0)