Archive for May, 2006

May 26th 2006

Cocoa and Life Update

Well, last time you heard from me I was looking for some contracting jobs. Several of you came through, and while I’m always willing to consider more projects, the honeymoon will be a good honeymoon with what extra work I was able to do. Thanks!

So, that’s what’s occupied most of my time. That, and being sick. It’s weird that after so long without being sick I all of a sudden get very ill twice in the same month. Hopefully I just got unlucky twice.

There’s the Cocoa update. He’s doing great. He was being cute the other day, wanting attention. When he wants attention when I’m at my computer, he’ll come lay his head on my knee, and look up at me with his best puppy-dog eyes. I hate to give in since it encourages the behavior, but I have to sometimes.

I now have two side project ideas I’m developing. It’s hard to decide what to work on. One has at least one guaranteed customer. The other could potentially make more money. Both of them I want to use myself. Decisions, decisions, decisions…

Well, I need to get back to work. I’ll try to post another algorithm problem solution, probably a bit trickier this weekend. If you have good problem ideas, feel free to comment.

Comments Off

May 16th 2006

Fun Algorithm Problem

Last night I was updating a piece of software that I needed to come up with a better solution for pairing things up. Once I had properly diagnosed that was the problem, I saw that I had a problem that I hadn’t ever solved before — you know, the best kind of problem to have :)

Well, it didn’t take me very long to solve it, but I thought it would be an interesting post here. So, here’s an analogous situation to what I had last night:

Problem: Every square has a list of colors, and every circle is filled with a color. Each square must have a circle connected to it, but can’t have a circle that is of a color that isn’t in its list. Not every circle must be connected to a square. Given an array of squares and circles, find a valid arrangement of connections.

Solution:

Continue Reading »

6 Comments »