Latest articles under General / Algorithm category

Brain teaser: splitting revenue fairly.

While this brain teaser can be applied to more than programming, I think it’s a very nice one to sharpen our problem-solving solution required to do a good programming. There were 2 people, A and B. They joined together to have a meal. Person A brought 3 loafs of bread. Person B brought 5 loafs […]

Posted on October 30th, 2010 under General / Algorithm  •  No Comments

Solving sudoku using PostgreSQL PL/pgSQL

I have no idea why I would want to solve sudoku in PostgreSQL PL/pgSQL. My guess would be just for the fun of it. I’m also hoping that it can serve as a tutorial example in programming PostgreSQL PL/pgSQL. So what is sudoku? It is basically a number puzzle where the objective is to fill […]

Posted on August 19th, 2009 under General / Algorithm, PostgreSQL  •  4 Comments

XML and Ampersand (&)

I’m not sure if many programmers know this. But it’s always a good thing to make sure that they (including me) do. XML specification doesn’t allow ampersand (&). Here’s a quote from W3c.org XML recommendation with bold emphasis added by me. The ampersand character (&) and the left angle bracket ( 5C’. How would you […]

Posted on August 4th, 2009 under General / Algorithm, PHP  •  3 Comments

Introduction to merging with SVN

One of the “problem” in using SVN with branches is that you have to figure out which revisions to apply. In most cases, one could not simply take the HEAD version and simply merge that to a branch or TRUNK. On this page, I’ll attempt to explain why we can’t simply merge the HEAD version. […]

Posted on April 3rd, 2009 under General / Algorithm  •  2 Comments

Floyd-Warshal algorithm in PostgreSQL PL/pgSQL.

This article is an extension of my previous article . This time, however, I will write the algorithm completely in PostgreSQL’s PL/pgSQL. For background information and to understand the premise of this post, please glance through my previous post. Ok now that you’re familiar with what we’re working towards, here’s my assumption of your database […]

Posted on January 24th, 2009 under General / Algorithm, PostgreSQL, Programming  •  1 Comment

Page 1 of 212