Finally got some time to breath...
Researching the n-Queens problem the night before it was assigned paid off! Today we tackled Complexity analysis with the specific case of n-Queen problem. The idea is to find all solutions of 'n' number of queens on a square board of size 'n'. A solution being a placement of n queens such that they do not threat each other.
After an hour or two on wikipedia last night I found out that the recursive method had the best balance of simplicity and efficiency. However, it turned out that the algorithm would be the easiest part of the project...
My partner and I had some trouble figuring out the testing framework. The calls were much more complicated than we had seen before and a very weird thing happend after which, we lost all confidence in the tests. Before dealing with the main recursive algorithm we had to populate the functions that would check threats between queens. We didn't fully understand at first how to fill out those functions, but went with our intuitions. The weird thing was that after dealing with row threats, which passed the row tests. Dealing with column threats, made the row tests fail! We couldn't figure out why this was happening and because of bad timing with lunch and lectures, we couldn't get much help from the staff. We lost a good hour on this...
After lunch we were able to get some help on the expected implementation of the threat calculating functions. After that, everything went very smoothly.
The recursive function development went very well, and after implementing the algorithm on the first of the 4 problems, we were able to simply copy and paste the algorithm into the other 3 problems of the set and we got the answers we were looking for very quickly!
This was the first time I was able to leave the day without feeling stressed. I felt that I completely owned the problem and felt in total control of the task.












