Tutorials
Courses
Go Premium
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.0K+ articles
Python
19.6K+ articles
Mathematical
5.1K+ articles
Python Programs
3.7K+ articles
Strings
2.1K+ articles
Dynamic Programming
1.1K+ articles
Recursion
591+ articles
Quick Sort
77+ articles
cpp-strings
59+ articles
tail-recursion
17 posts
Recent Articles
Popular Articles
Tail Call Optimisation in C
Last Updated: 23 July 2025
In C programming, Tail Call Optimization (TCO) is a technique that eliminates the need for an additional stack frame to store the data of another function by reusing the c...
read more
C Language
Algorithms-Recursion
optimization-technique
tail-recursion
Recursion in Python
Last Updated: 15 July 2025
Recursion involves a function calling itself directly or indirectly to solve a problem by breaking it down into simpler and more manageable parts. In Python, recursion is ...
read more
Python
python-basics
tail-recursion
Sum of series formed by difference between product and sum of N natural numbers
Last Updated: 07 October 2022
Given a natural number N, the task is to find the sum of the series up to Nth term where the ith term denotes the difference between the product of first i natural numbers...
read more
Mathematical
Recursion
DSA
series-sum
tail-recursion
Natural Numbers
Check if a given number is a Perfect square using Binary Search
Last Updated: 12 July 2025
Check if a given number N is a perfect square or not. If yes then return the number of which it is a perfect square, Else print -1.Examples:Input: N = 4900Output 70Explana...
read more
Divide and Conquer
Searching
Mathematical
Recursion
C++ Programs
DSA
Binary Search
tail-recursion
maths-perfect-square
Number of ways in which an item returns back to its initial position in N swaps in array of size K
Last Updated: 12 July 2025
Given two numbers K and N, the task is to find the number of ways such that an item at position i returns back to its initial position in an array of length K in N steps, ...
read more
Mathematical
Combinatorial
Technical Scripter
Recursion
Technical Scripter 2019
DSA
Arrays
array-rearrange
Permutation and Combination
tail-recursion
Divide an array into K subarray with the given condition
Last Updated: 29 March 2023
Given an array arr[] and an integer K. The task is to divide the array into K parts ( subarray ) such that the sum of the values of all subarray is minimum.The value of ev...
read more
Dynamic Programming
Recursion
DSA
Arrays
subarray
tail-recursion
Counts Path in an Array
Last Updated: 23 June 2022
Given an array A consisting of positive integer, of size N. If the element in the array at index i is K then you can jump between index ranges (i + 1) to (i + K).The task ...
read more
DSA
tail-recursion
Maximum number of given operations to remove the entire string
Last Updated: 07 February 2023
Given string str containing lowercase English characters, we can perform the following two operations on the given string:Remove the entire string.Remove a prefix of the s...
read more
Strings
Dynamic Programming
Recursion
DSA
prefix
tail-recursion
substring
Python | Handling recursion limit
Last Updated: 12 July 2025
When you execute a recursive function in Python on a large input ( 10^4), you might encounter a "maximum recursion depth exceeded error". This is a common error when exec...
read more
Python
Python Programs
tail-recursion
Check whether two strings are equivalent or not according to given condition
Last Updated: 14 August 2023
Given two strings A and B of equal size. Two strings are equivalent either of the following conditions hold true:1) They both are equal. Or,2) If we divide the string A in...
read more
DSA
tail-recursion
cpp-strings
Check if item can be measured using a scale and some weights
Last Updated: 06 February 2023
Given some weights of masses a0, a1, a2, ..., a100, a being an integer, and a weighing scale where weights can be put on both the sides of the scale. Check whether a parti...
read more
Technical Scripter 2018
DSA
tail-recursion
Number of ways to divide a given number as a set of integers in decreasing order
Last Updated: 27 March 2023
Given two numbersaandm. The task is to find the number of ways in which a can be represented by a set\{n_1, n_2, ...., n_c\}such thata = n_1 n_2 ... n_m 0and the summa...
read more
DSA
tail-recursion
Tail recursion to calculate sum of array elements.
Last Updated: 11 July 2025
Given an array arr, we need to find the sum of its elements using Tail Recursion Method. We generally want to achieve tail recursion so that compilers can optimize the cod...
read more
Recursion
DSA
tail-recursion
Recursive Practice Problems with Solutions
Last Updated: 19 July 2025
Basics - RecursionRecursive FunctionsTail RecursionStrings -Given a string, print all possible palindromic partitionsCheck if a number is PalindromePrint all possible stri...
read more
DSA
tail-recursion
Introduction to Recursion
Last Updated: 23 July 2025
The process in which a function calls itself directly or indirectly is called recursion and the corresponding function is called a recursive function. A recursive algorith...
read more
DSA
tail-recursion
DSA Tutorials
1
2
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !