Basic example
Input
most_common_item([1, 2, 2, 3])
Output
2
2 appears twice, more than any other item.
Full lesson preview
Count how often items appear and return the most frequent one, with a clear tie-breaker.
Problem statement
Task
Examples
Input
most_common_item([1, 2, 2, 3])
Output
2
2 appears twice, more than any other item.
Input format
Output format
Constraints
Samples
Input
most_common_item(['a', 'b', 'a', 'c', 'b', 'a'])
Output
a
a appears 3 times, more than any other item.