Reverse a doubly linked list

  • + 1 comment

    AGAIN!?

    public static DoublyLinkedListNode reverse(DoublyLinkedListNode llist)
    {
        return llist;
    }
    

    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?

    Solution.cs(96,50): warning CS8604: Possible null reference argument for parameter 'path' in 'StreamWriter.StreamWriter(string path, bool append)'.