Tag: recursion

Posted in Intermediate

Animated Tower of Hanoi

The Tower of Hanoi is a classic problem that lends itself well to a recursive solution. The story involves some… read more Animated Tower of Hanoi

Hilbert curve
Posted in Fractals Intermediate Turtle

Drawing Fractals with Lindenmayer Systems

Lindenmayer systems, or L-systems, provide a very powerful way to construct fractals. Lindenmayer used L-systems to describe the behaviour of… read more Drawing Fractals with Lindenmayer Systems

Posted in Basic Numbers

Binary Search

Binary Search is one of the most fundamental computer algorithms. Given an ordered list of some data (names, numbers, …)… read more Binary Search

Posted in Basic Turtle

Sierpinski Triangle, drawn by a Turtle

This is a classic fractal drawn with a recursion algorithm and Turtle graphics. The Sierpinski Triangle’s sides are bisected and… read more Sierpinski Triangle, drawn by a Turtle

Posted in Fractals Intermediate

Fractal Tree

This program draws a ‘tree’ by drawing a trunk (initially; later it’s a branch) and appending a tree, recursively. Uses… read more Fractal Tree