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 doubly linked list
Reverse a doubly linked list
Sort by
recency
|
697 Discussions
|
Please Login in order to post a comment
My Java 8 Solution
PSA: DO NOT USE KOTLIN
You cannot pass using Kotlin due to this issue, which still remains today.
My Java solution with linear time complexity and constant space complexity:
my code in go
reverse in place: