Java Practice-It || 16.1 set || implementing, ListNodes, LinkedLists

preview_player
Показать описание
Question:
Write a method set that accepts an index and a value and sets the list's element at that index to have the given value. You may assume that the index is between 0 (inclusive) and the size of the list (exclusive).

Assume that you are adding this method to the LinkedIntList class as defined below:

public class LinkedIntList {
private ListNode front; // null for an empty list
...
}

Рекомендации по теме