Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Associative Containers in Action | Containers
C++ STL Containers and Algorithms

bookChallenge: 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_duplicates on the provided string.

Solution

solution.cpp

solution.cpp

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 5
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

close

Awesome!

Completion rate improved to 6.67

bookChallenge: 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_duplicates on the provided string.

Solution

solution.cpp

solution.cpp

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 5
single

single

some-alt