Page 1 of 1

/** * QUESTION 6: LinkedLists (10 marks) * * @return The number of unique doubles in the list. return 0 i

Posted: Fri Jul 01, 2022 5:51 am
by answerhappygod
/** * QUESTION 6: LinkedLists (10 marks) * * @return The number of unique doubles in thelist. return 0 if the list is * empty. * * * Example: * * If head -> 4.5-> 5.2 -> 4.5 -> 6.4 -> 1.2 -> 1.2 -> null * * then countUniqueshould return 2 (since 5.2 and 6.4 are unique). * */ public int countUnique() { // To be completed return -1; }
cant use hash sets