Archive for the ‘Algorithms’ Category

Interview Code Snippets: Part 3

The latest in this series makes a shift from C++ to Java since that’s what I’ve been mucking about with lately. I’m in a little bit of a time squeeze at the moment so explanations will have to come later (though this code should be fairly readable and obvious what its doing).

import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import [...]

Interview Code Snippets: Part 2

Today’s potential interview question is to reverse a linked list, without recursion. This one can be rather tough on the brain if you don’t think visually, but the basic idea here is to keep a pointer to:

Keep a pointer to the next node so that you don’t lose a way to access it once you [...]

Interview Code Snippets: Part 1

Interviews in the field of programming are all very similar, usually involving a whiteboard and an algorithm. Sometimes these questions are so incredibly simple, yet for whatever reason you can’t craft an answer on the spot. I’m going to start a series on some code snippets that are common to see in interview situations. All [...]

Learning page

I kept updating my blog with a list of things I’d like to learn or improve upon, and it seemed redundant to continually copy/paste the information to a new post, just to update it. I would however like to keep the list online, so I’ve moved it to this single location.

Blog Considerations, Study List Updated

Updated 6/29/2009 : 09:15pm
I’ve been thinking for some time about the possibility of starting another website. This blog is certainly where I post general goings-on with me and my programming, but I think it would be cool to create a website dedicated to teaching up-and-coming programmers things, categorized in an easy to navigate way. This [...]

Interviews

I knew that when I started the job search, I would ultimately end up doing a lot of algorithm development in my interviews, so I made an investment in a good dry-erase whiteboard to practice on. I explained to Susanna that, as a programmer, a whiteboard is just as important as the computer or code [...]

Maze Solver

In my spare time this weekend, I wrote a maze solving algorithm, which is reminiscent of a program I wrote as homework over a year ago, but slightly better. Its still wasteful in terms of efficient moves, but the improvements can come later. Here’s a snippet of some methods from it, for the curious:

[...]

Anagrams

The code below is from an interesting problem I was solving as part of practice for an upcoming programming competition. It’s purpose is to read in a series of strings from an input file (the number of which is defined on the first line of that file), and discover the various permutations of the letters [...]

SEO URL parse

In working on a number of different web projects, I’ve had to create search-engine friendly URLs (I.E. ‘dxmio.com/blah/bleh’, instead of ‘dxmio.com/?x=blah&y=bleh’. The way to accomplish this seems to be with .htaccess and mod_rewrite sending everything to a base controller, like ‘index.php’. This of course leaves one very big problem which may not be completely obvious [...]

Internet Exploder, APE, and WoW 2.3

Today I spent 9 hours working on 3 different web projects. By the end, I felt a burning rage towards Internet Explorer, which is a pretty good indication of an average day in web development. Native support for hover? Guess not.
Friday I have to take the APE (Advanced Placement Exam) at EWU. This determines whether [...]