Recursion vs Iteration – Difference between Recursion and Iteration

Recursion vs Iteration. What’s the difference between recursion and iteration. Recursion and Iteration both are two different programming approaches. In some cases recursion is best suited and in some other cases iterative way of programming is good.

In programming, repeated set of instructions can be handled either by using recursive or iterative approach in your code. So which approach you choose and why. Let’s talk about recursion vs iteration.

Implementation of Binary Search using Recursion.

Reverse a Linked List using Recursion

Write a program to reverse a linked list using recursion. Given a linked list print them in reverse order using recursion. This question is mostly asked in interviews.

In my last post, I have explained how to reverse a linked list using an iterative approach. In this post, We will learn how to reverse a linked list using recursion.  The time complexity for both iterative and recursive approach is O(n).

Print Fibonacci Series using Recursion in C, C++

Write a program to print Fibonacci Series using recursion. Fibonacci series is a very important program in terms of interviews. To make this program little tough interviewer ask to write a fibonacci series code using recursion.

You can check my previous post to use iterative approach to print Fibonacci series.

What is Recursion.

In recursion function call itself until the base condition is reached.
Read explanation of recursion and what’s the difference between iterative and recursive function.

Objective Question on Recursion.

MCQ on Recursion – Recursion Objective Questions for Practice

MCQ on Recursion

Recursion is the most important concept in computer science. In my previous posts, i have written about binary search implementation using recursion and difference between recursion and iteration.

These MCQ helps you to understand the concept of Recursion.

1) Which Data Structure is used to perform Recursion?

a) Queue
b) Stack
c) Linked List
D) Tree

Recursion Concept with Example

What is recursion and how to use recursion in programming. If you are new to programming, then recursion concept is tough to understand. In this post, i’ll explain the concept of recursion with example.

What is Recursion ?

In Recursion, function call itself repeatedly, until the base condition is reached.  It’s a much preferred way to write cleaner and shorter code for many complex problems.

Through recursion, you can reduce complex problem into smaller version.