You Must Know Recursion Before the Next Interview

Ready for your next interview today #5

Geno Tech
Geek Culture

--

In this story, I am going to discuss recursion. Recursion is one of the main problem-solving concepts of computer science. Therefore, you must know how to solve this kind of problems in your Engineering life. Every technical interviewer nowadays prepared to ask one or many problem-solving questions to measure the ability of your skill with problem-solving. One of them may be a recursion problem mostly. We solve our problems using iteration. Here I will show you how to solve some popular problem using recursion.

A recursion, we can see as a procedure where the solution to a problem depends on solutions to smaller instances of the same problem. So we break the task into smaller subtasks. Let’s go to the discussion.

So in summary, I am going to discuss…

  1. Add the first N numbers.
  2. Difference between Recursion and Iteration
  3. Head VS Tail Recursion
  4. Stack With Recursion
  5. Problem 1: House Building Problem
  6. Problem 2: How to Calculate the Factorial of a Given Number
  7. Problem 3: Towers of Hanoi
  8. Problem 4: Euclidian Algorithm

--

--

Geno Tech
Geek Culture

Software Development | Data Science | AI — We write rich & meaningful content on development, technology, digital transformation & life lessons.