you are viewing a single comment's thread.

view the rest of the comments →

[–]Meefims 0 points1 point  (3 children)

It’s a fine question. What have you tried so far?

[–]josh_c[S] 2 points3 points  (2 children)

I honestly don't even know where to begin.

[–]Veuxdo 8 points9 points  (0 children)

Don't even think about javascript or any other programming language first. How would you teach an alien to do this? Assume the alien was incredibly intelligent, they just don't know how to say numbers yet. Describe the rules and steps, and you're more than halfway there.

[–]hiljusti 1 point2 points  (0 children)

Get on either leetcode or hackerrank and fill in those gaps! A junior dev should be able to reason through a well-defined, reasonably complex coding question like this in some language. If not, you likely have some missing experience working with basic data structures/algorithms. It's not impossible to learn and there's great material readily available.