Skip to main content

Practice ยท 2 of 2

Normalize: lowercase + sort

Implement std::vector<std::string> normalize(std::vector<std::string> v) returning a copy with every string lowercased and the whole vector sorted lexicographically. Use std::transform in place (it may take and return v by value) plus std::sort.

Difficulty: intermediate

Back to lesson: Practice: Algorithm practice