Section5Problems 1 - C SE143S ection # 5 p roblens In t his...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE143 Section #5 problens In this section we will be learning about linked lists. Each list is composed of individual nodes of type ListNode. The class ListNode has two data fields: one for storing the item of data and the other for storing a reference to the next node. public class ListNode { int da.ta; ListNode next; / / data stored in this node / / link to next node in the list / / post: consLructs a node with data 0 and nul1 link ListNodeO { this (0, null) ; constructs a node with given data and, nurl link ListNode(int data) ( t,his(data, nu11); t data and given rink data, LisENode next) { this.data = data; this.next n€xt; ) in rnr,n.It paq: you'll see-pictures of linked nodes before and after some changes. Write the code that will produce
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online