Challenge: Associative Containers in Action
Tâche
Swipe to start coding
You are given a fixed string in the main function. Your task is to:
- Implement a function
std::string remove_duplicates(const std::string& input)that returns a string where all duplicate characters are removed, preserving the first occurrence order; - Print the result after calling
remove_duplicateson the provided string.
Solution
solution.cpp
Tout était clair ?
Merci pour vos commentaires !
Section 2. Chapitre 5
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Awesome!
Completion rate improved to 6.67
Challenge: Associative Containers in Action
Glissez pour afficher le menu
Tâche
Swipe to start coding
You are given a fixed string in the main function. Your task is to:
- Implement a function
std::string remove_duplicates(const std::string& input)that returns a string where all duplicate characters are removed, preserving the first occurrence order; - Print the result after calling
remove_duplicateson the provided string.
Solution
solution.cpp
Tout était clair ?
Merci pour vos commentaires !
Section 2. Chapitre 5
single