The nodes in an ordered linked list are kept in a desired order. For this chapter, the nodes contain integers, and they are kept in ascending numerical order. In general, an ordered linked list can contain nodes that contain lots of data, and the desired order depends on part of the data.
But for now, our nodes contain just integers and a link to the next node. The linked list in this chapter allows repeated values. Some data structures do not allow this.
The values held in the nodes of our ordered linked list are integers.
Does the Node
class need to change?