Lesson 4: Counting Elements

Counting is the process of determining the number of elements of a finite set of objects, i.e., determining the size of a set.

Open reading material (PDF)

FrogRiverOne

Find the earliest time when a frog can jump to the other side of a river.

Difficulty Level: Easy

PermCheck

Check whether array A is a permutation.

Difficulty Level: Easy

MaxCounters

Calculate the values of counters after applying all alternating operations: increase counter by 1; set value of all counters to current maximum

Difficulty Level: Medium

MissingInteger

Find the smallest positive integer that does not occur in a given sequence.

Difficulty Level: Medium