Visual illustration of the code challenge: Greenoïd #3 - An alternative reality

Greenoïd #3 - An alternative reality

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

Mission

You set off in search of the robot through brambles and giant ferns. By tracing its movements, you come to a small clearing. There, behind a large root, you spot a secret passageway that leads underground. Without hesitating for a second, you rush inside and stumble upon a huge underground base. What you see there leaves you speechless for several minutes. In front of you, hundreds of machines and robots are working in a frenzied atmosphere. The acronym ‘Assistance Universelle de Réhabilitation de l'Atmosphère’ scrolls across the screens on the walls, and a worrying countdown shows that there are less than two hours to go before… But before what?

You notice a computer in a discreet corner of the room. Scanning its data, you realise that AURA is in fact an artificial intelligence created thousands of years ago to protect nature and humanity. Always active, it monitors and protects the balance of Greenoïd. So why is her system on alert? Could it have been corrupted by a malicious program? In the computer files, you'll find a repository detailing the various robot commands. They activate as if preparing to wage war. You need to find out what's going on, and fast.

Rules

A computer provides a register of the robots in the base.

Each robot is set a specific task, designated by a letter:

C = CREATE

H = HEAL

P = PRESERVE

D = DESTROY

This gives a list of robots of this type: HPDHDCDHDHDCHCPDDDDDDHCDCPHDHHDP

You need to return the operation that occurs most frequently and the number of associated robots, separated by a ‘_’, for example ‘CREATE_56’ or ‘HEAL_49’.

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: GREENOID_3

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 ;)

Programming concept(s) that can be used to solve this challenge: Conditions, Tableaux, Calculs

Keep coding

Other challenges to complete

Intermediate
STARSHIP #2 : Attention aux météorites !

STARSHIP #2 : Attention aux météorites !

Une pluie de météorites approche… Ton vaisseau aura t-il assez d’énergie pour le traverser sans encombre ?

Behavioral
Intermediate
Petits monstres mignons #3

Petits monstres mignons #3

On poursuit l’étude de ces mignons petits monstres ! Cette fois-ci ils ont fini de manger.

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