What function am I supposed to use in order to count the number of occurrences of an element??? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What function am I supposed to use in order to count the number of occurrences of an element???

17th Jul 2021, 2:50 PM
Shahir
Shahir - avatar
2 Answers
0
You will need to use data structure called "map" inorder to map the occurrence of each element. This is how I would have gone to solve this problem.
17th Jul 2021, 3:05 PM
Rohit
0
If you don't mind Explain me with the example
17th Jul 2021, 3:54 PM
Shahir
Shahir - avatar