Two ways to solve Boggle boards in C++