Answer the question
In order to leave comments, you need to log in
Can anyone help with the algorithm from the codility site?
I just can not understand how this algorithm works, and how to do it using javascript. Problem with codility sites, can anyone help?
Answer the question
In order to leave comments, you need to log in
There are no tricks in the task - you need to stupidly implement what is written there. emulate this process.
Hint: a cycle do ... while
will work fine here . One variable should indicate which of the people is currently active. You must add his letter to the answer and move on to another person, taking the corresponding element from array A. The loop should work until you return to the first person. The solution itself will be literally 3 lines, not counting the brackets.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question