Question
Home Assignment 1 Linked Lists Instructions: 1. This is an individual assignment. You are not allowed to copy code from anybody to copy code from
Home Assignment 1 Linked Lists Instructions: 1. This is an individual assignment. You are not allowed to copy code from anybody to copy code from the Internet 2. Any late submission will reduce your grade, and no submissions will be accepted after 24 hours of the deadline. 3. Plagiarism means zero marks and administrative consequences from the college and university. 4. Name your Java file/project as
size() returns the number of items stored in the bag. contains(item) determines if the given target item is stored in the list and returns the appropriate Boolean value. insertFirst(item) adds a given item to the beginning of the list. insertLast(item) adds a given item to the end of the list. deleteFirst() removes the first node from the list; an exception is raised if the list is empty. deleteLast() removes the last node from the list; an exception is raised if the list is empty. delete(item) removes and returns an occurrence of item from the list; an exception is raised if the element is not in the list. copy(SinglyLinkedList list) copies all elements of a given singly linked list to the list initializing it to the empty state first. Test all the operations of Reverse Singly Linked List ADT in the main method.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started