We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Get Node Value
Get Node Value
Sort by
recency
|
975 Discussions
|
Please Login in order to post a comment
Yet another C# broken template (5th now?)
remove result class, but keep its guts. make method non-public.
Still broken a month later...
I suspect these been broken for years and they just don't care...
solution with JS
Simple Solution with O(N) complexity
https://github.com/shahiakhilesh1304/DSA/blob/main/Solution/Question16/SolutionScreenShots/image.png
For the reference of the code
typescript, just recursion, not creating a stack or a dict of the visited nodes