>RunTimeFix
BookStudyPracticeInterviewsYouTubeCoursesAbout
Log inGet Started
Topics/Recursion & Backtracking
beginner level

Recursion & Backtracking

Quick Answer

What is Recursion & Backtracking?

Recursion is a function calling itself with a smaller input until reaching a base case. It's the foundation for divide-and-conquer, DFS, dynamic programming, and backtracking. RunTimeFix teaches recursive thinking step by step: understanding the call stack, parameter passing by value vs reference, and the leap of faith (trust the recursive call works for smaller inputs). Backtracking extends recursion with explicit undo operations — perfect for generating permutations, combinations, and exploring solution spaces. We cover pruning techniques to cut unpromising branches early, and meet-in-the-middle to handle exponential search spaces by splitting them in half.

  • recursion
  • backtracking
  • call stack
  • meet in the middle
  • pruning
  • permutations
  • combinations

Study Material for Recursion & Backtracking

Ch 4: Functions & Recursion

Function Mechanics & Variable Scope · Parameter Passing: Value vs. Reference · Recursion & the Call Stack

Ch 28: Backtracking & Meet-in-the-Middle

The Backtracking Template · Generating Combinatorial Objects · Pruning · Meet-in-the-Middle

Related Topics

Dynamic ProgrammingAlgorithmsCompetitive Programming
Was this helpful?

Published by RunTimeFix · Comprehensive guides for competitive programming

>RunTimeFix

Practical programming education. Books, videos, courses, and hands-on learning for competitive programming, DSA, and software engineering.

RunTimeFix

  • About
  • YouTube
  • Book
  • Study Library
  • Courses

Learn

  • Competitive Programming
  • DSA
  • Development
  • Databases

Legal

  • Privacy
  • Terms
  • Refund Policy

RunTimeFix — debug → solve → run

© 2026 RunTimeFix. All rights reserved.