4 ms·
Some of my favorite concepts from undergraduate computer science are how some data structures and problems are "naturally" recursive and lend themselves to recu
by thesuperbigfrog 3y ago
Some of my favorite concepts from undergraduate computer science are how some data structures and problems are "naturally" recursive and lend themselves to recursive algorithms.
For example, tree data structures and singly linked lists work well with recursive algorithms for elegant processing. Problems like parsing a grammar, dynamic programming (knapsack, etc.), and many more are easier to comprehend with recursion.
"Foundations of Computer Science" (http://infolab.stanford.edu/~ullman/focs.html http://infolab.stanford.edu/~ullman/focs.html) is a favorite book that does an excellent job at showing how to think and reason recursively.