Placing 8 Queens

I figure the second post I make ought to be a bit nerdy.

This is an algorithm we were working on in class yesterday, and I thought was pretty cool. It’s called the Eight Queens Puzzle. The challenge is to place eight queens on a chess board without them being able to attack each other. The solution we were taught uses Backtracking, which is slowly exploding my mind.
This little bit of code uses a helper recursive function and an isValid to check if a queen can be placed. The queens’ locations are stored in a vector of strings where “Q…….” is a queen on the first column, and the vector index is the row.

This is the recursive helper function:


The First Post!

I don’t know what to talk about already…

I guess I should introduce myself. I’ll probably turn this into the about page soon enough.

One of the more significant things I’ve done is start this website. And the other is probably build an college level ultimate frisbee team. See photo!

Awesome GNAR Ultimate players
This was my first tournament as Captain/President, and it was a blast.

There are few things better than chasing down a frisbee on a sunny day.
I suppose that’s why I’m here. To keep track of the good days, journal about what I’ve learned, and share my ideas with anyone who cares. The website presented itself as a good platform to stand on.

But enough about me, lets talk about my past.
I was born in Portland Oregon on March 2nd 1992, and things have just been getting better since then.
I lived in Portland, went to Catholic school, and spent a lot of time playing all the sports. I was accepted to Seattle University and began my freshman year in September of 2010, and now it’s 2013! I’ll be graduating in a couple months with a Bachelors of Science and Computer Science, and am currently on the job hunt, so if you hear of anything don’t be a stranger.

Also, I’m not a great writer, and will probably make mistakes, and will probably do stuff I’m not suppose to do, if you have any suggestions or ideas feel free to comment or contact me. Help is always appreciated.