Question: answer it quickly using java language pleaseeeeeeeeeee (68... LTE. LTE ) X 19 MPS Palestine technical University Kadoorie Instructor's Name Salman Course's Name Data Structures

 answer it quickly using java language pleaseeeeeeeeeee (68... LTE. LTE )

answer it quickly using java language pleaseeeeeeeeeee

(68... LTE. LTE ) X 19 MPS Palestine technical University Kadoorie Instructor's Name Salman Course's Name Data Structures Course's Number: 12140203 Questions' Number 3 Questions Total Mark:40 Time: 110 Mins Date: 18/1/2021 ER Student's Name Student's Number Section's Numbers Final Makeup (13 Question #1 Points) Write a java method called "remove Distinct that receives the head of a singly linked list and removes nodes containing distinct values (i.e. nodes having distinct values will be removed and nodes containing duplicate values will not be removed). The linked list class have only the followings: 1) a public head attribute which is a reference to the first node (node has next and data attributes) 2) a public size attribute which is a count of nodes in the linked tist, 3) Two contructors 4) boolean add(Objecto, int index) // adds a node at a specific index. if index size the method returns false and returns true otherwise. 5) boolean remove(Object o/// removes the first existence of the node containing data equal to o. if no node contains a value equal to the method returns false Important notes 1) Assume that the linked list contains integers. 2) You are not allowed to define helper methods. 3) Do not use recursion 4) You are not allowed to use another data structure (like array, set...) to store the list in it temporarily Palestine Technical University door Instructor's Name Student's Name Course's Name Data Structures Course's Number: 12140203 Questions Number: 3 Questions Total Mark: 40 Time: 110 Mins Date: 18/1/2021 Student's Number Final Make Section's Number bo Questio Points): IIII 88 (13

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!