You Might Not Need that Recursive Function in JavaScriptby@nas5w
25,254 reads
25,254 reads

You Might Not Need that Recursive Function in JavaScript

by Nick Scialli4mFebruary 25th, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In programming, we’re often faced with situations where the answer appears to require solving the same problem an indeterminate number of times. Recursion is extremely important in programming and many problems can only be solved by using it. But recursion can be slower, fill up the call stack, and can be conceptually trickier. In this post, I explore an example of a problem that seems to lend itself to a recursion solution. The motivation for this post example came from an excellent StackOverflow answer that I have adapted.
featured image - You Might Not Need that Recursive Function in JavaScript
Nick Scialli HackerNoon profile picture
Nick Scialli

Nick Scialli

@nas5w

Husband, dog dad, coffee monster. Software engineer at the @usds! Opinions are my own

About @nas5w
LEARN MORE ABOUT @NAS5W'S
EXPERTISE AND PLACE ON THE INTERNET.

Share Your Thoughts

About Author

Nick Scialli HackerNoon profile picture
Nick Scialli@nas5w
Husband, dog dad, coffee monster. Software engineer at the @usds! Opinions are my own

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
L O A D I N G
. . . comments & more!