Tag: recursion

Recursive vs. Iterative Palindrome Check

palindrome-definition

For this challenge we will investigate two algorithms used to find out if a word is a palindrome or not. The first algorithm will use an iterative approach, the second algorithm will use a recursive approach. Iterative Approach An iterative

The Social Network

social-network

Six Degrees of Separation The Six degrees of separation is an idea that was originally set out by Frigyes Karinthy in 1929 and that can be applied to Social Networks such as Facebook. It is based on the idea that

Backtracking Maze – Path Finder

backtracking-maze-algorithm

The purpose of this Python challenge is to demonstrate the use of a backtracking algorithm to find the exit path of Maze. Backtracking Algorithm A backtracking algorithm is a recursive algorithm that attempts to solve a given problem by testing

Backtracking Algorithm – Sudoku Solver

Using a Backtracking algorithm to solve a Sudoku Puzzle

The purpose of this Python challenge is to demonstrate the use of a backtracking algorithm to solve a Sudoku puzzle. Did You Know? The objective of a Sudoku puzzle is to fill a 9×9 grid with digits so that each

Backtracking Algorithm – Magic Square Solver

magic-square

The purpose of this Python challenge is to demonstrate the use of a backtracking algorithm to solve a Magic Square puzzle. Did You Know? A 3×3 magic square is an arrangement of the numbers from 1 to 9 in a

Euler’s Number

euler-continued-fraction

The number e is a famous irrational number called Euler’s number after Leonhard Euler a Swiss Mathematician (1707 – 1783). Number e is considered to be one of the most important numbers in mathematics. The first few digits are: 2.7182818284590452353602874713527…

Factorial Challenge

factorial-of-5

In Mathematics, the factorial of n is denoted by n! and calculated by the product of integer numbers from 1 to n. For instance: In this challenge you will write a Python program that asks the user to enter a

Python Fractals

Sierpinski-triangle-ani

Fractal? A fractal is a curve or geometrical figure, which is based on a recurring pattern that repeats itself indefinitely at progressively smaller scales. Fractals are useful in modelling some structures (such as snowflakes), and in describing partly random or