Java Practice-It || 16.12 linkedNodes12 || ListNodes, LinkedLists

preview_player
Показать описание
Question:
Write the code necessary to convert the following sequence of ListNode objects:

list [1] [2] [3] /
Into these sequences of ListNode objects:

list [2] /
list2 [1] [3] /
Assume that you are using ListNode class as defined in the textbook:

public class ListNode {
public int data; // data stored in this node
public ListNode next; // a link to the next node in the list

public ListNode() { ... }
public ListNode(int data) { ... }
public ListNode(int data, ListNode next) { ... }
}

Рекомендации по теме
Комментарии
Автор

My teacher assigns practice its such as these without providing any notes/references that we can use to solve them. Your videos are a real life saver but I can't imagine how long it took you to make all of these.

Untalanted