Question: Need help finishing this doubly linked list code. Commented lines are what's needed, also add the following recursive methods: findFirstNodeWithValue() and getDisplayString() that returns a

Need help finishing this doubly linked list code.

Commented lines are what's needed, also add the following recursive methods: findFirstNodeWithValue() and getDisplayString() that returns a string containing the strings in the list separated by spaces

Code in C# language only, please.

internal class DoubleLinkedList { public DoubleLinkedListNode? firstNode = null; public DoubleLinkedListNode? lastNode = null; public DoubleLinkedListNode? currentNode = null; // other class level variables needed?

public DoubleLinkedList() { // creates first node in list with firstValue }

public DoubleLinkedList(string firstValue) { // methods and features to add: // get current node reference // insert node before first // delete first node // insert node after last // delete last node // insert node after current - uses multiple methods // delete current // move current to next node // move current to previous node // recursive: find node with value - return reference or null // recursive: get display string } }

/******************************* * double Linked List Node - needs to be made generic * class is incomplete * *****************************/ internal class DoubleLinkedListNode { public string? value = null; public DoubleLinkedListNode? nextNode = null; public DoubleLinkedListNode? previousNode = null; public DoubleLinkedListNode(string v) { value = v.ToLower(); }

private DoubleLinkedListNode() { value = null; } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!