Learning DSA, Day 001: Recursion Basics

Using Abdul Bari’s, Mastering Data Structures & Algorithms using C and C++ to grok the basics. Now that I grok programming, understanding DSA should help me write and think better. And writing rough notes or thoughts to myself here, keeps me accountable and on track.1 Today’s topic? The Basics of Recursion Types of Recursion Tail Recursion Head Recursion Tree Recursion Indirect Recursion Nested Recursion Tail Recursion When a recursive call, is the last statement in a recursive function, that’s tail recursion func(n) { if (n>0) { blah … ; blah … ; blah … ; func(n-1); } } All the operations in the examples above happen at call time....

August 8, 2022 · Mario Jason Braganza