In this article, we will explore stack and its properties and operation, then we will cover recursion and explain why stack is used for recursion, finally we will discuss how to convert recursive to iterative approach.
Table of contents:
Introduction to StackAdd Elements into StackDelete Elements from StackRecursionStack for RecursionConverting Recursive to Iterative Approach
In short, the Data Structure used for Recursion is Stack (LIFO) Data Structure.
Pre-requisites:
Stack data struct...
Published on June 07, 2022 17:27