Definition at line 5 of file main.cpp.
◆ repeatedCharacter()
| char Solution::repeatedCharacter |
( |
string |
s | ) |
|
|
inline |
Definition at line 8 of file main.cpp.
9 {
10 set<char> characters;
11 for (char c: s)
12 {
13 if (characters.find(c) != characters.end())
14 return c;
15 else
16 characters.insert(c);
17 }
18 return '\0';
19 }
The documentation for this class was generated from the following file: