Visual illustration of the code challenge: Greenoïd #2 - A lead to investigate

Greenoïd #2 - A lead to investigate

Analyse the robot logs to try and find where it came from
Coding in the sandbox You must be logged in to access the sandbox.

Mission

A strange noise, like a mechanical whine, is heard… You jump for joy: you've managed to reactivate the robot! Its little red eyes start to flash and a series of letters appears on its belly screen: NCS WPNC DE HWP.


What on earth does that mean? Your thoughts are interrupted by a high-pitched beep: your new friend seems to be running on battery power. You barely have time to copy these mysterious characters before it switches off again, obviously completely discharged. You look at each other in amazement. Where could this little android have come from and, above all, who could have built it? Could this new, seemingly incomprehensible code lead you to the beginnings of an answer?

Rules

4 letters come up most often: NSEW

These are the 4 cardinal points: North, South, East and West.

This is the history of the robot's movements displayed on the screen. Knowing that the robot and our heroes are currently in the zone defined by positionX and positionY, we should be able to find the robot's starting point by retracing its history in reverse.

A few details:

  • East and West vary positionX
  • North and South vary positionY
  • Each move is worth 1 (or -1)

You need to return the robot's initial position, in the form X_Y, for example ‘3_5’ or ‘-2_17’.

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_2

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: Grille 2D, Chaines de caractères

Keep coding

Other challenges to complete

Beginner
Petits monstres mignons #4

Petits monstres mignons #4

Revoilà les petits monstres, ils ont bien mangé, ils ont quitté le repas, et maintenant… ils se rapprochent…

Calculation
Beginner
Web And Chocolate

Web And Chocolate

Une agence web, un chef gourmand et une équipe passionnée de chocolat !

Calculation
Beginner
Les notes de musique

Les notes de musique

La musique, 7 notes, et une infinité de possibilité. Sauras tu déchiffrer une première mélodie ?

Calculation