Visual illustration of the code challenge: WALL-E #4 : un peu de rangement

WALL-E #4 : un peu de rangement

Wall-E s’ennuie un peu et décide de ranger tous les blocs de déchets qu’il a construit.

Coding in the sandbox You must be logged in to access the sandbox.

Mission

Wall-E continue de tasser les déchets pour faire des petits blocs. Comme il s’ennuie un peu tout seul, il décide de ranger tous ces blocs. Avec le temps, il est devenu maniaque et souhaite donc faire uniquement des colonnes qui ont un nombre de blocs pair.

Règles

Les colonnes de blocs se succèdent dans une même chaîne de caractères, par exemple :

AAAABBB représente 2 colonnes AAAA (4 blocs) et BBB (3 blocs).

Dès que Wall-E voit une colonne qui a un nombre de blocs impairs, il retire 1 bloc.

Tu dois retourner :

Une chaîne de caractères qui contient tous les blocs retirés, dans l’ordre de la chaîne de caractères initiale.

Par exemple, si la chaîne est AAAABBBCCCCDDD, tu dois retourner BD.

Solve the challenge

To code this challenge, several possibilities:
- Want to start coding right away? Use the online Sandbox.
- Want to work in your favorite editor? Organize your code well, test, check out our API documentation.
- You can also copy/paste a dataset below.

challenge code for resolution via API: WALL_E_4

Some resources to help you:
Data and algorithmic logic Methodologies Corrections

Support for resolution

Progress through challenges using our resolution aids: tools, techniques and advice to help you overcome the most complex programming challenges with methodology, confidence and creativity.

Dataset and algorithmic logic

Based on the data and the expected response, use the process to determine the logic to implement.

Show data and progress

Methodologies

Develop a structured approach with our solving guides. Work on specific concepts such as object-oriented programming or unit testing to improve your coding style and progress.

No methodology yet for this challenge, but we are working on it! Follow us to be informed of the release!


Corrections

The corrections allow you to discover certain technical concepts but will also give you a solution to the challenge. Code the challenge yourself before consulting the corrections ;)

No answer yet for this challenge, but we&'re working on it! Follow us to be informed of the release!

Programming concept(s) that can be used to solve this challenge: Conditions, Programmation Orientée Objet, Parsing

Keep coding

Other challenges to complete

Intermediate
Greenoïd #6 - A project to sink

Greenoïd #6 - A project to sink

Behavioral Corrigé disponible : Java
Intermediate
Jeux Olympiques – Tableau des médailles

Jeux Olympiques – Tableau des médailles

Bientôt les jeux olympiques de Paris 2024 ! Vérifie le fonctionnement du tableau des médailles.

Behavioral Corrigé disponible : PHP
Intermediate
L’explorateur de l’espace #3

L’explorateur de l’espace #3

Avec tes satellites, tu peux obtenir des informations depuis les frontières de l’univers connu… Mais comment va tu traiter cette énorme quantité d’informations ??

Behavioral