Computer Science for IGCSE & O level - Algorithm Design And Problem Solving (Section 1 - No. 8)

What is the primary purpose of the standard method 'counting' in algorithm design?
To determine the total sum of a set of numbers.
To determine the average value of a set of numbers.
To count the number of occurrences of certain conditions or items.
To sort a list of items in a specific order.

Explanation

Counting is used to enumerate the occurrences of specific elements or conditions.

Comments (0)

Advertisement