RUSH 01 for the 42piscine

The goal is to solve the Skyscraper game with a program in C. The puzzle of the game follows the sudoku structure but with some restrictions. It looks like this:

Alt text

The generated program finds the solution given the numbers on the arrows as an argument.

Instalation & compilation

Install it with

git clone

Compile the files

gcc *.c

Usage

The example above should be passed to the program this way:

Screen Shot 2022-10-01 at 8 05 03 PM

The solution of this puzzle looks like this :

Screen Shot 2022-10-01 at 8 07 27 PM

Algorithm

It is basically done by using a recursive function depending on a main condition that when is not fulfilled the recursion goes back. In other words, with backtracking