Java Practice-It || 16.7 deleteBack (pt.1) || implementing, ListNodes, LinkedLists

preview_player
Показать описание
Question:
Write a method deleteBack that deletes the last value (the value at the back of the list) and returns the deleted value. If the list is empty, your method should throw a NoSuchElementException.

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
...
}

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