During a recent, mock technical interview, I was given the following problem to solve. Write a function that takes in two inputs, an array, and a number. Remove the first item in the array. Then, move it to the last place in the array. Repeat this t...

Markdown supported · ⌘↵ to post
Your first solution was the only thing in my head, till I saw the patterns..
Nice write up by the way..
Edidiong Asikpo (Didi)
Senior Developer Advocate at Ambassador Labs
Amazing explanation Shannon Crabill. Prior to some months ago, I hated algorithms because I used to ignore trying to understand the problem first before jumping into solving the problem immediately.
Your article is definitely an indication that I am on the right track now. Thanks for sharing this.