I had never really worked with maps in development before, so I needed to test that my idea was actually possible. I created the first bare-bones version of the algorithm after a few weeks of mulling over the idea in a weekend.
This task felt gigantic, but I wrote out the steps and went one at a time. Then would throw it all out and redo it based on what I learned.
I learned that when you're tackling something complicated, get clarity where you can by taking the time to organize and name your variables really well.