17 posts
Hi,
I'm bewwys I'm a student at the 42 codingschool . I'm glad to be here. I'm a noob so please take care of me :)
What algorithm can I use ?
Edited by
bewwys
on
Reason: Initial post
Hello guys,
given n tetris pieces I have to find the minimum square I can fill in. (tetris pieces can't rotate)
What kind of algorithm can I use for this problem ?
I was thinking to a packing algoritm or backtracking but I'm not sure.
Thanks a lot.
17 posts
Hi,
I'm bewwys I'm a student at the 42 codingschool . I'm glad to be here. I'm a noob so please take care of me :)
What algorithm can I use ?
Thank you,
yeah backtracking is the one who come first to mind but it's really inefficient I have to wait like more than hours to solve 26 tetris pieces :-(
I want to go for a NP hard algorithm but I don't know how accurate it is.
My first prioritize is to pack the tetris pieces in the min square.
Next is to do that in a reasonable mount of time.
But if I have no choice I will go for backtracking.