The Morse Code was designed to quickly transfer messages using a series of “dots (.)” and “dashes (-)”. Morse code was named after Samuel Morse, one of the inventors of the telegraph. The International Morse Code includes the 26 letters…
A computer system consists of hardware and software. The hardware components are the physical components of the computer system whereas software refers to the programs that run on and control the computer hardware. Some of the hardware components can be…
The aim of this challenge was to write a recursive backtracking algorithm to solve a connect flow puzzle. The aim of the game is to connect all the pairs of dots of the same colours, positioned on a 2D grid,…
This challenge is based on this Frog puzzle board game. At the start of the game several green frogs and one red frog are positioned on the board/pond on different waterlilies based on a given configuration. (The game comes with…
In computer science, sorting algorithms are used to sort the elements of a data sets in numerical or alphabetical order. In this blog post will investigate the Python code used to implement 4 of the most frequently used sorting algorithms:…
The quick sort algorithm is a divide-and-conquer algorithm that can be implemented using a recursive function. The following graphic explains the different steps of a quick sort algorithm. Note, that the quick sort algorithm starts by identifying a pivot. Depending…
A tree is a complex data structure used to store data (nodes) in a “parent/child” relationship. The top node of a tree (the node with no parent) is called the root. Each node of a tree can have 0, 1…
In this challenge we will implement a backtracking algorithm to solve a game of Rush Hour using a trial and error approach. We will also investigate the need to apply some basic heuristics to improve our algorithm and avoid a…
In this challenge, we are going to use a backtracking algorithm to solve a puzzle game called Noah’s Ark. First, you will need to fully understand how the game works. You can check the “How To Play” tab on this…
The Prime Factor Tree is a visual technique used in Maths to workout all the prime factors of a large number. With this approach, all the leaf nodes (nodes without sub-branches) are the prime factors of the root node. For…