A
A
Arturchick2021-03-24 01:34:08
JavaScript
Arturchick, 2021-03-24 01:34:08

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

1 answer(s)
W
Wataru, 2021-03-24
@wataru

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 question

Ask a Question

731 491 924 answers to any question