i-love-linux-and-need-cat-ears:
i-love-linux-and-need-cat-ears:
auugh i don’t wanna write recursion but it’s the best solution for what i want to achieve
Start off by creating a recursive solution but then rewrite it as iterative after for performance reasons.
Certain problems are easier to think in recursive terms, but iteration is often favorable since it doesn’t enter functions over and over again causing the stack grow in size.
will definitely have to rewrite a more performant solution (or cache the solution since i am only processing a shitton of data), i only have to do recursion because i can’t add 80mb of binary data and expect dijkstra to solve that and need to preprocess
will definitely look into rewriting for iteration then (if my mvp even works)