(This question is for a linked list of the type described on the front page, Item 5). Write a recursive function CountGE60. that receives a linked list (may or may not be empty) and returns the number of nodes (each containing a data item value) greater than or equal to 60.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter17: Linked Lists
Section: Chapter Questions
Problem 18SA
icon
Related questions
Question

(This question is for a linked list of the type described on the front page, Item 5). Write a recursive function CountGE60. that receives a linked list (may or may not be empty) and returns the number of nodes (each containing a data item value) greater than or equal to 60. 

(5) Unless specified otherwise, the following items apply to all linked list related problems:
➤ List is singly-linked and each node has the following structure:
struct Node
{
};
int data;
Node *link;
A pointer-to-head-node provides the handle to the list.
➤For an empty list, the pointer-to-head-node contains the null address (null pointer).
For a non-empty list, the link field of the last node contains the null address (null pointer)
you to
DO NOT assume that there are library (toolkit) functions (of any kind) available for
Transcribed Image Text:(5) Unless specified otherwise, the following items apply to all linked list related problems: ➤ List is singly-linked and each node has the following structure: struct Node { }; int data; Node *link; A pointer-to-head-node provides the handle to the list. ➤For an empty list, the pointer-to-head-node contains the null address (null pointer). For a non-empty list, the link field of the last node contains the null address (null pointer) you to DO NOT assume that there are library (toolkit) functions (of any kind) available for
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Declaring and Defining the Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning