Question: QUESTION 8 (P/Cr level). Worth 20 marks k@param min lower bound * @param max: upper bound @return number of items that are in the range

 QUESTION 8 (P/Cr level). Worth 20 marks k@param min lower bound

QUESTION 8 (P/Cr level). Worth 20 marks k@param min lower bound * @param max: upper bound @return number of items that are in the range [min, max] k For example, if state of list is: * head-> 2-> 8 -> -5-> 0-> 12-> 1-> null, min = 0, max = 8, return 4 k if state of list is: * head-> 2-> 8 -> -5-> 0-> 12-> 1-> null, min = 100, max = 200, return 0 if state of list is: * head-> 2-> 8 -> -5-> 0-> 12-> 1-> null, min = 10, max = 0, return 0 *(no item can be in range [10, 0] if state of list is: * head -> 2 8 50 - 12 - 1 - null, min - -10, max -2, return 1 public int countInRange(int min, int max) ( return 0; //to be completed QUESTION 9. Worth 10 marks k@param item: item that should be removed from the list kremove all occurrences of the given item from the list public void removeAll (int item) { /to be completed

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!