Recursion

Build recursive reasoning through basic number, array and string exercises before subsets, combinations and backtracking problems.

66 online
Overall Progress
PLUS – Videos, editorials, planner all in one place – Videos, editorials, personalised planner & TUFY all in one place to save your time.

Planly

Know more

Striver’s Recursion and Backtracking Sheet contains 50 coding questions. It combines the retained 20-question selection with 30 additional source exercises, including the basic recursion practice from A2Z and the separate C++ beginner curriculum. The coverage now begins with simple recursive calls and results before moving to subsequences, combinations, partitions and constrained search.

Recursion handles a task through calls on smaller or simpler states. Backtracking explores alternatives and restores a choice before moving to a sibling branch. Use this sheet to explain both parts clearly: why progress reaches a base case, and why later choices begin with the correct state rather than inheriting changes from a different branch.

Topics covered in this practice sheet

The foundation exercises cover counting in both directions, sums, factorial, powers, digit operations and Fibonacci numbers. Array and string drills add printing, reverse-order output, minimum and maximum, target counts, searches, sorted checks, reversal and palindromes. Power Set then bridges basic recursive choices and later subset or subsequence variations. Related operations can reappear under distinct source statements.

  • Call flow and recursive number, digit, array and string exercises.
  • Power sets, subsequences, subsets, combinations and generated sequences.
  • Partitions and constrained searches with state that must be restored between alternatives.

Beginner lessons and prerequisites

The linked lessons cover recursion theory, parameters, call flow and recursive problem solving. Learners need ordinary function calls, parameters, return values, loops, arrays and strings first. Review these programming basics before beginning recursion.

Know function parameters, return values, arrays and mutable collections. Be able to trace which call is currently running and where the waiting caller resumes. A local value and a shared choice buffer behave differently after a return. If the required output stores many choices, understand why the saved result must preserve each completed answer independently.

  • Write a base case that describes a finished valid answer or a failed branch.
  • Identify what becomes smaller or how many decisions remain after each call.
  • Distinguish active call-stack space from the storage used by all returned answers.