42 School project. From the subject (also available in french):
Fillit is not about recoding Tetris, even if it’s still a variant of this game. Your program will take a file as parameter, which contains a list of Tetriminos, and arrange them in order to create the smallest square possible.
Obviously, your main goal is to find the smallest square in the minimal amount of time, despite an exponentially growing number of possibilities each time a piece is added.
You should think carefully about how you will structure your data and how to solve this problem, if you want your program answers before the next millenium.