Frequency of Elements
Medium📝 Description
Find the frequency of each element in a list.
Input Format
[1, 2, 2, 3, 3, 3]
Output Format
{1: 1, 2: 2, 3: 3}
Constraints
List length ≤ 10^5
🔍 Sample Input
[1, 2, 2, 3, 3, 3]
✅ Sample Output
{1: 1, 2: 2, 3: 3}
Code Editor
Please login to run and submit code.
Results
Suggested Solution
Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run