Solves brick panel puzzle using dynamic programming.