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
- Discussions
Reverse a doubly linked list
Reverse a doubly linked list
Sort by
recency
|
22 Discussions
|
Please Login in order to post a comment
AGAIN!?
Solution.cs(34,25): warning CS8625: Cannot convert null literal to non-nullable reference type. Solution.cs(35,25): warning CS8625: Cannot convert null literal to non-nullable reference type. Solution.cs(33,16): warning CS8618: Non-nullable field 'head' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. Solution.cs(33,16): warning CS8618: Non-nullable field 'tail' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. Solution.cs(24,25): warning CS8625: Cannot convert null literal to non-nullable reference type. Solution.cs(25,25): warning CS8625: Cannot convert null literal to non-nullable reference type. Solution.cs(22,16): warning CS8618: Non-nullable field 'next' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. Solution.cs(22,16): warning CS8618: Non-nullable field 'prev' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. Solution.cs(110,43): error CS0103: The name 'reverse' does not exist in the current context
These lines are not editable, so what the heck are you supposed to do?
My answer in Python
Java
Iterative
Recursive:
This and "reverse a linked list" code is bugged from the beggining in Java 8 (the only Java that has autocomplete), is there any fu__ing checking in this website ?
Java 15 O(n)