Java MyLinkedList with insertSortNoDuplicate method
Not what you're looking for?
Write a Java class MyLinkedList that includes implementation of:
i. int insertSortNoDuplicate(Object object) that will insert an object at correct position in the ascending (increasing) order. The method also will return -1 if the given object already exists in the current list, otherwise returns 0.
ii. Iterator getIterator(int order) that will return an Iterator object reference that will traverse the elements on the current based on the value of order. If the order is 0 then will traverse from head to tail, otherwise it will traverse from tail to head.
iii. void updateList(MyLinkedList otherlist) that will update the current list with a given otherlist. If an element in current list exists in the otherlist then replace (update) it, otherwise insert (add) it using the above insertSortNoDuplicate method.
Purchase this Solution
Solution Summary
Java version "1.7.0_21" was used during development of this program.
Solution Preview
See the attached file.
This response works with following type of linked list node.
private class Node
{
public Student value;
...
}
Attached archive 562134.zip contains three files: MyLinkedList.java, Student.java, and TestMyLinkedList.java .
After unzipping the archive, go to folder ...
Purchase this Solution
Free BrainMass Quizzes
Basic Networking Questions
This quiz consists of some basic networking questions.
Word 2010: Table of Contents
Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.
Word 2010: Tables
Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.
Java loops
This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.