← FIS questions

Count distinct years in a paragraph

Filed under FIS

The question

Given a paragraph as a string, count the number of different years present in it (for example, a sentence mentioning 2002 and 2029 yields 2).

No write-up yet. Related questions below have one.

Related FIS questions

Collected from public candidate posts and coding forums. Updated Nov 2026.