Question: For Problems 4 and 5, the Node class is declared as: class Node { int value; Node next; // constructors } 4. (5 pts) Implement

For Problems 4 and 5, the Node class is declared as: class Node { int value; Node next; // constructors } 4. (5 pts) Implement the method int numberPositive(Node head) that counts the number of positive integers in a linked list of integers iteratively. Assume the linked list is reference by head. 5. (5 pts) Implement the method Node search (Node head, int key) that returns the reference to the node with the value key in a linked list of distinct integers iteratively. Assume the linked list is reference by head. The method returns null if the search fails
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
