This is a very basic challenge where explanation and solution are kinda the same thing, so just make sure you understand what methods used in solution do and you’re good!
Later, when you will meet more advanced problems, this also won’t be an issue actually, because there are enormous variety of possible ways to solve any problem. For example, try to implement nextInLine(arr, item) in two more ways:
Purely imperative programing (intermediate): no methods allowed!
Codewars style (advanced): function body must have only one line that starts with return
As you can see, you can challenge yourself further with any problem
Go have a snack, stretch your legs, then come do the challenge. If you remember the general concept of the solution, that’s no big deal. Just keep working. We do try to prevent this from happening by removing or blurring solutions, but we don’t catch them all.
It’s good to hear that I have nothing to worry about as long as I understand it and liked your suggestion on stretching the problem a bit further. You’re right about finding more than one ways to solve as this is exactly I experienced in another challenge.
I’ll wait for 3 days and see if I will be able to remember the solution right away. If you are curious, it was from this forum that I saw the answer by mistake. Maybe it’s good idea to blur out the codes to prevent future campers from seeing the answer.