Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Recursion For Programmers
Rating: 4.4 out of 5(115 ratings)
1,051 students

Recursion For Programmers

Algorithms and Data Structures: Recursion, the Stack and Trees
Last updated 4/2022
English

What you'll learn

  • Call functions recursively
  • Understand how recursion works
  • Understand the stack and stack frames
  • Avoid stack corruption
  • Use recursion in any mainstream programming language
  • Know the pros and cons of recursion and iteration
  • Navigate tree structures
  • Traverse disk directories recursively
  • Code samples in C, Java, Ruby...

Course content

2 sections31 lectures2h 4m total length
  • What is this course about?1:46

    Recursion is a powerful technique but it can be quite difficult to understand. This course explains how recursion works in all mainstream programming languages.

  • How to follow this course3:01

    How should you use this course to understand recursion?

  • Source Code Archive [DOWNLOAD]0:38

    Download and unzip this archive of sample code

  • Java Code Archive0:04

    Java programmers may download this archive which contains most of the C sample programs translated into the Java language.

  • Readme0:05

    Download this file for information on more books and web sites and any other notes or FAQs on this course.

  • What is Recursion For?2:36

    Some books treat recursion as a puzzle-solving technique. It’s not. It has numerous important, real-world applications.

  • A Simple Recursive Function4:12

    Let’s begin by taking a look at a very short recursive function.

  • Debugging Recursion7:44

    Here I’ll show how to debug recursive code using Visual Studio

  • Recursion and variable scope2:07

    How are local variables affected by recursion?

  • How recursion works5:35

    So how does recursion actually work? This may be the most important lesson in the course!

  • Recursion and Stack Frames3:09

    What is a stack frame and why does it matter?

  • Debugging the Call Stack5:57

    Let’s use a debugger again to see how the call stack works

  • Deeper into Recursion4:30

    Here we look at more examples of recursive functions

  • Recursion in Ruby2:15

    Recursive functions work the same way in most languages. To prove that, I’ve translated the last C project into Ruby.

  • Recursive Functions that return values5:21

    How does a recursively-called function return a value?

  • Return values are special2:37

    Why isn’t the value of a local variable discarded when it is returned by a function?

  • Recursion, Iteration or Arithmetic4:04

    When you should use iteration or arithmetic rather than recursion?

  • Fundamentals Of Recursion

Requirements

  • You should already be familiar with one or more programming languages
  • You should be able to program at least one language with confidence

Description

Recursion is a powerful programming technique. A function that calls itself recursively not only saves programming effort and avoids repetition but it can also be used to navigate complex structures such as Trees and Class Hierarchies.

This is an intermediate-to-advanced level course. It is aimed at programmers who can already program confidently in one or more programming languages. It is not appropriate for beginners.

The courses includes numerous short sample programs to show how recursion works. There are samples written in C, Ruby and C#. However, you don’t need to program in those languages to follow this course. Recursion works the same way in all mainstream programming languages. This course explains the theory and the practice of recursion. You can use the techniques that are taught to write recursive functions in whichever language you prefer: C, C#, Java, JavaScript, Python, Basic, Pascal and others. The course is not about any specific language.

This is what you will learn…

  • What is recursion?

  • How variables are scoped in recursive functions

  • How recursive functions return values

  • The Stack and Stack Frames

  • Debugging recursive functions

  • Recursion v Iteration

  • Stack Corruption, and how to avoid it

  • Infinite Recursion, and how to avoid it

  • Recursing Fibonacci Numbers

  • Recursing a Class Hierarchy

  • Trees and recursion

  • Navigating subdirectories recursively

  • Code samples provided in C, Java, Ruby...

Who this course is for:

  • Programmers who want to understand recursion in depth
  • Anyone who needs to extend their knowledge of algorithms and data structures