Algorithm Mars Exploration - HackerRank Solution JavaScript

A space explorer's ship crashed on Mars! They send a series of SOS messages to Earth for help.

Letters in some of the SOS messages are altered by cosmic radiation during transmission. Given the signal received by Earth as a string, s, determine how many letters of the SOS message have been changed by radiation.

Example

The original message was SOSSOS. Two of the message's characters were changed in transit.

Function Description

marsExploration has the following parameter(s):

string s: the string as received on Earth

Returns

int: the number of letters changed during transmission

Video
Suscríbete al canal

Read more in HackerRank

See the Pen Algorithm Mars Exploration

See the Pen Algorithm Mars Exploration by Vladimir Salguero (@vladisalguero) on CodePen.

0 Comentarios