In one of the online coding interviews I was given a problem to create a snake game we all played in old days. The problem statement was something like this given the moves you have to determine after how many moves the snake will eat himself. I was able to solve the problem, but as I was solving it I was thinking "can I can give this code a little more life with javascript".

So here I am, this post is an attempt to give life to that algo 😊


Score: {{points - 1}}