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.
Reverse a linked list
Reverse a linked list
Sort by
recency
|
903 Discussions
|
Please Login in order to post a comment
Fourth broken C# template.
Remove class result but keep its guts. make reverse function non-public (remove public keyword).
Geeze hackerrank -- didn't expect it that bad. And you guys test for our ability to program?
Here is my c++ solution, you can watch video explanation here : https://youtu.be/F4nGusqPIu0
Cannot be solved via c#, its broken. Fields for the node needs to be changed to nullable.
Language: Java ☕
Video solution:
https://www.youtube.com/watch?v=5Dbh0dXG6-c
Recursive approach
Time complexity:
Space complexity:
What do you think? 😀
recursive python solution: