July 2018
Beginner
202 pages
5h 4m
English
Scenario
We have a linked list containing some elements and we need to build a string of the form [3,6,4,2,4]. If the list is empty, it should output [].
Aim
To write code in Java for traversing the linked list.
Steps for Completion
public String toString() {}
In this section, we have seen how we can implement the various operations found in the linked list. The data structure will be a base tool that we will use to model queues and stacks. Linked lists will also be extensively used in more advanced algorithms further along the book.
Read now
Unlock full access