This program solves the 5x5x5 brick-cube-puzzle in less than one second using a sophisticated algorithmic approach. The implementation is both highly efficient as well as easy to understand. The presented techniques are suited for many optimization problems and also can be used for educational purposes.
In the programming language C the programmer is responsible for handling the (heap) memory allocations. This means, whenever memory is allocated on the heap using e.g. `malloc`, the programmer has to ensure that this allocation is released to the OS again. But does this always hold?