Intermediate C++
2 अभ्यास · सिखाने के क्रम में
- 1Sort and de-duplicateWrite `vector<int> unique_sorted(vector<int> v)` returning the values sorted ascending with duplicates removed.sortuniqueerase idiom10m
- 2Most frequent word lengthWrite `int commonest_length(const string& text)` returning the word length that occurs most often, splitting on whitespace. On a tie, return the *smaller* length. Empty text returns 0.mapstringstreamcounting12m