René's URL Explorer Experiment


Title: Introduction to Recursion - GeeksforGeeks

Open Graph Title: Introduction to Recursion - GeeksforGeeks

Description: Your All-in-One Learning Portal. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.

Open Graph Description: Your All-in-One Learning Portal: GeeksforGeeks is a comprehensive educational platform that empowers learners across domains-spanning computer science and programming, school education, upskilling, commerce, software tools, competitive exams, and more.

Keywords:

Opengraph URL: https://www.geeksforgeeks.org/dsa/introduction-to-recursion-2/

direct link

Domain: www.geeksforgeeks.org


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"Article","mainEntityOfPage":{"@type":"WebPage","id":"https://www.geeksforgeeks.org/dsa/introduction-to-recursion-2/"},"headline":"Introduction to Recursion","datePublished":"2017-01-11 06:11:57","dateModified":"2026-06-13 09:53:27","image":[{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20251017100714609283/im1.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20251017100734567454/im2.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20251017100749510274/im3.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20251017100803314548/im4.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20251017100828076919/im5.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20251017100842627590/im6.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20251017100853761668/im7.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20251017100907179517/im8.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20240924132748/factorial.webp","width":"801","height":"245"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20250319103918713990/Recursion-1.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20250319103917789568/Recursion-2.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20250319103918967763/Recursion-3.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20250319103919474025/Recursion-4.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20250319103919877930/Recursion-5.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20250319103919667848/Recursion-6.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20250319103919206948/Recursion-7.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20250319103918397321/Recursion-8.webp","width":"800","height":"400"},{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/uploads/20250318141757504475/Fibonacci-series.webp","width":"800","height":"456"}],"author":{"@type":"Organization","name":"GeeksforGeeks","url":"https://www.geeksforgeeks.org/","logo":{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/cdn-uploads/logo-new-2.svg","width":"301","height":"40"}},"publisher":{"@type":"Organization","name":"GeeksforGeeks","url":"https://www.geeksforgeeks.org/","logo":{"@type":"ImageObject","url":"https://media.geeksforgeeks.org/wp-content/cdn-uploads/logo-new-2.svg","width":"301","height":"40"}},"description":"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 algorithm takes one step toward solution and then recursively call itself to further move. The algorithm stops once we reach the solution.Since called function may","about":[{"@type":"Thing","name":"Algorithm"},{"@type":"Thing","name":"Recursion"},{"@type":"Thing","name":"Dsa"},{"@type":"Thing","name":"TailRecursion"},{"@type":"Thing","name":"DsaTutorials"}]}
{"@context":"https://schema.org","@type":"WebSite","name":"GeeksforGeeks","url":"https://www.geeksforgeeks.org/","potentialAction":{"@type":"SearchAction","target":"https://www.geeksforgeeks.org/search/{search_term_string}/","query-input":"required name=search_term_string"}}
{"@context":"https://schema.org","@type":"Organization","name":"GeeksforGeeks","url":"https://www.geeksforgeeks.org/","logo":"https://media.geeksforgeeks.org/wp-content/cdn-uploads/20200817185016/gfg_complete_logo_2x-min.png","description":"Your All-in-One Learning Portal: GeeksforGeeks is a comprehensive educational platform that empowers learners across domains-spanning computer science and programming, school education, upskilling, commerce, software tools, competitive exams, and more.","founder":[{"@type":"Person","name":"Sandeep Jain","url":"https://in.linkedin.com/in/sandeep-jain-b3940815"}],"sameAs":["https://www.facebook.com/geeksforgeeks.org/","https://twitter.com/geeksforgeeks","https://www.linkedin.com/company/1299009","https://www.youtube.com/geeksforgeeksvideos/"]}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"DSA","item":{"@type":"Thing","@id":"https://www.geeksforgeeks.org/category/dsa/"}},{"@type":"ListItem","position":2,"name":"introduction-to-recursion-2","item":{"@type":"Thing","@id":"https://www.geeksforgeeks.org/dsa/introduction-to-recursion-2/"}}]}
{"@context":"https://schema.org","@type":"VideoObject","name":"Introduction of Recursion","description":"Introduction of Recursion in ProgrammingIn this video, we explore the concept of Recursion in Programming, a technique where a function calls itself in order to solve a problem. Recursion is a powerful and elegant approach to solving complex problems by breaking them down into smaller, more manageable sub-problems. In this tutorial, well cover the basics of recursion, its key principles, and how to implement it in your own programs.Key Features of RecursionSelf-Referencing A recursive function calls itself with modified parameters to work on smaller instances of the problem.Base Case Recursion relies on a base case to terminate the recursive calls and prevent infinite loops.Simplification of Problems Recursion is particularly effective for problems that can be naturally divided into smaller sub-problems, such as tree traversal, sorting algorithms, and more.Steps to Implement RecursionIdentify the Base Case Determine the simplest instance of the problem that can be solved directly without further recursion.Define the Recursive Case Define how the function should break the problem into smaller sub-problems and call itself with those smaller instances.Ensure Termination Ensure that each recursive call progresses toward the base case to avoid infinite recursion.Common Mistakes to AvoidMissing Base Case Failing to include a base case is a common error that can lead to infinite recursion and stack overflow.Excessive Recursion Depth Recursive solutions can sometimes exceed the maximum recursion depth, leading to a stack overflow. Be mindful of the problem size.Not Breaking Down the Problem Ensure that each recursive step makes progress toward solving a smaller instance of the problem.Applications of RecursionTree Traversal Recursion is widely used in traversing data structures like trees and graphs.Sorting Algorithms Algorithms like Merge Sort and Quick Sort use recursion to break down the problem into smaller sub-problems.Dynamic Programming Many dynamic programming problems are solved using recursion to build up solutions from smaller sub-problems.Backtracking Algorithms Problems like Sudoku, N-Queens, and other puzzle-solving algorithms are often solved using recursion.Why Learn Recursion?Understanding recursion is crucial for developing an in-depth understanding of algorithms and data structures. By mastering recursion, you willEnhance Problem-Solving Skills Learn how to solve complex problems by breaking them down into smaller, manageable sub-problems.Boost Algorithmic Thinking Recursion is a core concept used in many classic algorithms, and understanding it will significantly improve your ability to tackle algorithmic challenges.Deepen Your Programming Knowledge Recursion is widely used in various programming paradigms, and knowing it will allow you to write more efficient and elegant code.Topics CoveredBasics of Recursion Understand the fundamental concepts of recursion and its components.Recursive Functions Learn how to implement recursive functions in different programming languages.Real-World Examples Discover real-world applications of recursion in solving problems like tree traversal and sorting.","thumbnailUrl":["https://media.geeksforgeeks.org/courses/IntroductionofRecursion/IntroductionofRecursion20241106130804.jpg","https://media.geeksforgeeks.org/courses/IntroductionofRecursion/IntroductionofRecursion20241106130804-seo.png","https://media.geeksforgeeks.org/courses/IntroductionofRecursion/IntroductionofRecursion20241106130804-small.png"],"uploadDate":"2024-11-06T13:08:36Z","duration":"PT0H10M21S","contentUrl":"https://www.geeksforgeeks.org/videos/introduction-of-recursion/"}

theme-color#308D46
imagehttps://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_200x200-min.png
og:image:typeimage/png
og:image:width200
og:image:height200
facebook-domain-verificationxo7t4ve2wn3ywfkjdvwbrk01pvdond
og:site_nameGeeksforGeeks
og:imagehttps://media.geeksforgeeks.org/wp-content/uploads/20240924132748/factorial.webp
article:sectionAlgorithms
article:tagDSA Tutorials
og:typearticle
og:localeen_US
article:published_time2017-01-11 18:11:57+00:00
article:modified_time2026-06-13 09:53:27+00:00
og:updated_time2026-06-13 09:53:27+00:00
og:image:secure_urlhttps://media.geeksforgeeks.org/wp-content/uploads/20240924132748/factorial.webp
msapplication-TileImagehttps://www.geeksforgeeks.org/wp-content/uploads/gfg_200X200.png
next-head-count44

Links:

https://www.geeksforgeeks.org/
DSA Tutorialhttps://www.geeksforgeeks.org/dsa/dsa-tutorial-learn-data-structures-and-algorithms/
Interview Questionshttps://www.geeksforgeeks.org/dsa/top-100-data-structure-and-algorithms-dsa-interview-questions-topic-wise/
Quizzeshttps://www.geeksforgeeks.org/dsa/data-structures-and-algorithms-online-quiz/
Must Dohttps://www.geeksforgeeks.org/dsa/must-do-coding-questions-for-companies-like-amazon-microsoft-adobe/
Advanced DSAhttps://www.geeksforgeeks.org/dsa/advanced-data-structures/
System Designhttps://www.geeksforgeeks.org/system-design/system-design-tutorial/
Aptitudehttps://www.geeksforgeeks.org/aptitude/aptitude-questions-and-answers/
Puzzleshttps://www.geeksforgeeks.org/aptitude/puzzles/
Interview Cornerhttps://www.geeksforgeeks.org/interview-prep/interview-corner/
DSA Pythonhttps://www.geeksforgeeks.org/dsa/python-data-structures-and-algorithms/
Towers of Hanoi (TOH)https://www.geeksforgeeks.org/dsa/c-program-for-tower-of-hanoi/
Inorder/Preorder/Postorder Tree Traversalshttps://www.geeksforgeeks.org/dsa/tree-traversals-inorder-preorder-and-postorder/
DFS of Graphhttps://www.geeksforgeeks.org/dsa/depth-first-search-or-dfs-for-a-graph/
stackhttps://www.geeksforgeeks.org/dsa/stack-data-structure/
tree traversalshttps://www.geeksforgeeks.org/dsa/tree-traversals-inorder-preorder-and-postorder/
Tower of Hanoihttps://www.geeksforgeeks.org/dsa/c-program-for-tower-of-hanoi/
Inorder Tree Traversal without Recursionhttps://www.geeksforgeeks.org/dsa/inorder-tree-traversal-without-recursion/
Iterative Tower of Hanoihttps://www.geeksforgeeks.org/dsa/iterative-tower-of-hanoi/
Fibonaccihttps://www.geeksforgeeks.org/maths/fibonacci-sequence/
Merge Sort,https://www.geeksforgeeks.org/dsa/merge-sort/
Quick Sorthttps://www.geeksforgeeks.org/dsa/quick-sort-algorithm/
Tower of Hanoihttps://www.geeksforgeeks.org/dsa/c-program-for-tower-of-hanoi/
Fibonacci Serieshttps://www.geeksforgeeks.org/maths/fibonacci-sequence/
Factorial Problemhttps://www.geeksforgeeks.org/dsa/program-for-factorial-of-a-number/
Practice Recursion - Easyhttps://www.geeksforgeeks.org/dsa/practice-questions-for-recursion/
Practice Recursion - Mediumhttps://www.geeksforgeeks.org/dsa/practice-questions-for-recursion-set-3/
Practice Recursion - Hardhttps://www.geeksforgeeks.org/dsa/practice-questions-for-recursion-set-5/
Quiz on Recursionhttps://www.geeksforgeeks.org/quizzes/top-mcqs-on-recursion-algorithm-with-answers/
Algorithmshttps://www.geeksforgeeks.org/category/dsa/algorithm/
Recursionhttps://www.geeksforgeeks.org/category/dsa/algorithm/recursion/
DSAhttps://www.geeksforgeeks.org/category/dsa/
tail-recursionhttps://www.geeksforgeeks.org/tag/tail-recursion/
DSA Tutorialshttps://www.geeksforgeeks.org/tag/dsa-tutorials/
Logic Building Problems2 min readhttps://www.geeksforgeeks.org/dsa/logic-building-problems/
Analysis of Algorithms1 min readhttps://www.geeksforgeeks.org/dsa/analysis-of-algorithms/
Array3 min readhttps://www.geeksforgeeks.org/dsa/array-data-structure-guide/
String2 min readhttps://www.geeksforgeeks.org/dsa/string-data-structure/
Hashing2 min readhttps://www.geeksforgeeks.org/dsa/hashing-data-structure/
Linked List3 min readhttps://www.geeksforgeeks.org/dsa/linked-list-data-structure/
Stack2 min readhttps://www.geeksforgeeks.org/dsa/stack-data-structure/
Queue2 min readhttps://www.geeksforgeeks.org/dsa/queue-data-structure/
Tree2 min readhttps://www.geeksforgeeks.org/dsa/tree-data-structure/
Graph3 min readhttps://www.geeksforgeeks.org/dsa/graph-data-structure/
Searching Algorithms2 min readhttps://www.geeksforgeeks.org/dsa/searching-algorithms/
Sorting Algorithms3 min readhttps://www.geeksforgeeks.org/dsa/sorting-algorithms/
Introduction to Recursion15 min readhttps://www.geeksforgeeks.org/introduction-to-recursion-2/
Greedy Algorithms3 min readhttps://www.geeksforgeeks.org/dsa/greedy-algorithms/
Graph Algorithms3 min readhttps://www.geeksforgeeks.org/dsa/graph-data-structure-and-algorithms/
Dynamic Programming2 min readhttps://www.geeksforgeeks.org/dsa/dynamic-programming/
Bitwise Algorithms4 min readhttps://www.geeksforgeeks.org/dsa/bitwise-algorithms/
Segment Tree2 min readhttps://www.geeksforgeeks.org/dsa/segment-tree-data-structure/
Binary Indexed Tree12 min readhttps://www.geeksforgeeks.org/dsa/binary-indexed-tree-or-fenwick-tree-2/
Trie Data Structure15+ min readhttps://www.geeksforgeeks.org/dsa/trie-insert-and-search/
Square Root (Sqrt) Decomposition Algorithm15+ min readhttps://www.geeksforgeeks.org/dsa/square-root-sqrt-decomposition-algorithm/
Interview Corner2 min readhttps://www.geeksforgeeks.org/interview-corner/
GFG 1602 min readhttps://www.geeksforgeeks.org/courses/gfg-160-series
Coding Practice1 min readhttps://www.geeksforgeeks.org/dsa/geeksforgeeks-practice-best-online-coding-platform/
POTD2 min readhttps://www.geeksforgeeks.org/problem-of-the-day
Data Structures and Algorithms Course2 min readhttps://www.geeksforgeeks.org/courses/dsa-self-paced
DSA and System Design Course2 min readhttps://www.geeksforgeeks.org/courses/dsa-system-design-live-sde-interview-course
https://www.geeksforgeeks.org/
https://in.linkedin.com/company/geeksforgeeks
https://www.instagram.com/geeks_for_geeks/
https://twitter.com/geeksforgeeks
https://www.facebook.com/geeksforgeeks.org/
https://www.youtube.com/geeksforgeeksvideos
https://geeksforgeeksapp.page.link/gfg-app
https://geeksforgeeksapp.page.link/gfg-app
About Ushttps://www.geeksforgeeks.org/about/
Legalhttps://www.geeksforgeeks.org/legal/
Privacy Policyhttps://www.geeksforgeeks.org/legal/privacy-policy/
Contact Ushttps://www.geeksforgeeks.org/about/contact-us/
Advertise with ushttps://www.geeksforgeeks.org/advertise-with-us/
GFG Corporate Solutionhttps://www.geeksforgeeks.org/gfg-corporate-solution/
Campus Training Programhttps://www.geeksforgeeks.org/campus-training-program/
POTDhttps://www.geeksforgeeks.org/problem-of-the-day
Job-A-Thonhttps://practice.geeksforgeeks.org/events/rec/job-a-thon/
Blogshttps://www.geeksforgeeks.org/category/blogs/?type=recent
Nation Skill Uphttps://www.geeksforgeeks.org/nation-skill-up/
Programming Languageshttps://www.geeksforgeeks.org/computer-science-fundamentals/programming-language-tutorials/
DSAhttps://www.geeksforgeeks.org/dsa/dsa-tutorial-learn-data-structures-and-algorithms/
Web Technologyhttps://www.geeksforgeeks.org/web-tech/web-technology/
AI, ML & Data Sciencehttps://www.geeksforgeeks.org/machine-learning/ai-ml-and-data-science-tutorial-learn-ai-ml-and-data-science/
DevOpshttps://www.geeksforgeeks.org/devops/devops-tutorial/
CS Core Subjectshttps://www.geeksforgeeks.org/gate/gate-exam-tutorial/
Interview Preparationhttps://www.geeksforgeeks.org/aptitude/interview-corner/
Software and Toolshttps://www.geeksforgeeks.org/websites-apps/software-and-tools-a-to-z-list/
ML and Data Sciencehttps://www.geeksforgeeks.org/courses/category/machine-learning-data-science
DSA and Placementshttps://www.geeksforgeeks.org/courses/category/dsa-placements
Web Developmenthttps://www.geeksforgeeks.org/courses/category/development-testing
Programming Languageshttps://www.geeksforgeeks.org/courses/category/programming-languages
DevOps & Cloudhttps://www.geeksforgeeks.org/courses/category/cloud-devops
GATEhttps://www.geeksforgeeks.org/courses/category/gate
Trending Technologieshttps://www.geeksforgeeks.org/courses/category/trending-technologies/
DSAhttps://www.geeksforgeeks.org/videos/category/sde-sheet/
Pythonhttps://www.geeksforgeeks.org/videos/category/python/
Javahttps://www.geeksforgeeks.org/videos/category/java-w6y5f4/
C++https://www.geeksforgeeks.org/videos/category/c/
Web Developmenthttps://www.geeksforgeeks.org/videos/category/web-development/
Data Sciencehttps://www.geeksforgeeks.org/videos/category/data-science/
CS Subjectshttps://www.geeksforgeeks.org/videos/category/cs-subjects/
Interview Cornerhttps://www.geeksforgeeks.org/interview-prep/interview-corner/
Aptitudehttps://www.geeksforgeeks.org/aptitude/aptitude-questions-and-answers/
Puzzleshttps://www.geeksforgeeks.org/aptitude/puzzles/
GfG 160https://www.geeksforgeeks.org/courses/gfg-160-series
System Designhttps://www.geeksforgeeks.org/system-design/system-design-tutorial/
@GeeksforGeeks, Sanchhaya Education Private Limitedhttps://www.geeksforgeeks.org/
All rights reservedhttps://www.geeksforgeeks.org/copyright-information/

Viewport: width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=3.0

Robots: index, follow, max-image-preview:large, max-snippet:-1


URLs of crawlers that visited me.