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:
The generated program finds the solution given the numbers on the arrows as an argument.
Install it with
git clone
Compile the files
gcc *.c
The example above should be passed to the program this way:
The solution of this puzzle looks like this :
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