Count the occurrences of each element in a list.
MediumProblem Statement
Count the occurrences of each element in a list.
Sample Input
[1, 2, 2, 3, 3, 3]
Sample Output
{1: 1, 2: 2, 3: 3}
Limits
Time: 2s · Memory: 256 MB
Count the occurrences of each element in a list.
[1, 2, 2, 3, 3, 3]
{1: 1, 2: 2, 3: 3}
Time: 2s · Memory: 256 MB