cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
C++ How do i find most repeated elements
C++ How do i find most repeated elements in a vector
Oct 20, 2018 at 5:40pm UTC
lastpeony
(2)
I am trying to find most repeated elements in a vector.
Lets say this is the vector:
[2,3,4,6,3,2,9 17,2,21,3,6,9,12]
in this case 2 is repeated 3 times and 3 is repeated 3 times
how to output this ???
Oct 20, 2018 at 7:14pm UTC
lastchance
(6980)
std::map<int,int>
Topic archived. No new replies allowed.