Repeated in Array
Lesson 18 of 18 in Coddy's Functions in C++: Building Your Own Functions course.
Challenge
HardWrite a function to find the most repeated characters in an array.
The function will take an array and return the characters that are repeated the most.
Example:
- Input:
{'a', 'b', 'c', 'a', 'b', 'a', 'c', 'c', 'c', 'b', 'b'} - Output:
"b c"
Try it yourself
#include <iostream>
#include <vector>
vector<char> findMostRepeatedChars(vector<char> input) {
}All lessons in Functions in C++: Building Your Own Functions
1Introduction
Introduction2Beginner-level function
Repeat a StringReverse a StringMax ValueFill stringCenter TextFormat TextMath Operation