Tree recursive vs linear recursive queens problem