Building Recursive Algorithms in Swift

In this series, we’ve examined object-oriented and functional programming techniques used to create algorithms and data structures. However, another method to consider is recursion. In a nutshell, recursion is a coding technique that provides an indeterminate set of references to one’s self. In this essay, we’ll review the concept of recursion and will demonstrate how to write recursive code with Swift.




Modern code, Illustrations & Computer science

Recommended from Medium

The importance of logical data modelling

Building an iOS app that detects Yoga poses — Part 1

Create a beautiful Network Layer With Swift

Not Really Loving iOS 14’s App Library And Widgets

Making A Custom Camera In iOS

SwiftUI- Create Horizontal List

UIKit: rendering components in SwiftUI

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Wayne Bishop

Wayne Bishop

I write about Swift Development & Computer Science. Get more tips on technical interview preparation at —

More from Medium

Advanced Swift Concurrency — How to create multiple parallel Tasks

Working With Custom “xcconfigs” and Cocoapods

SOLID-The open-close principle in Swift

Equal Stacks Swift HackerRank Solution