<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Halvor Strand</title>
	<atom:link href="http://www.halvorstrand.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.halvorstrand.com</link>
	<description>- you say "jump", I say "how high?" -</description>
	<lastBuildDate>Tue, 22 Jun 2010 09:39:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Diverse</title>
		<link>http://www.halvorstrand.com/?p=1</link>
		<comments>http://www.halvorstrand.com/?p=1#comments</comments>
		<pubDate>Tue, 30 Jun 2009 23:00:40 +0000</pubDate>
		<dc:creator>Halvor Strand</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Geeking]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sparetime]]></category>
		<category><![CDATA[Squash]]></category>

		<guid isPermaLink="false">http://www.halvorstrand.com/?p=1</guid>
		<description><![CDATA[Personlig:

Facebook (Halvor Strand)
LinkedIn (Halvor Strand)
Skype (Ondkloss)
Twitter (Ondkloss)
Flickr (Ondkloss)

Teknologi:

TopCoder (Shrug)
SPOJ (Shrug)
Project Euler (Shrug)

Fritid:

Squash (NTNUI)
Trening (NTNUI)


]]></description>
			<content:encoded><![CDATA[<div class="announcement_post"><div><strong>Personlig:</strong></div>
<ul>
<li>Facebook (<a title="Facebook" href="http://www.facebook.com/ondkloss" target="_blank">Halvor Strand</a>)</li>
<li>LinkedIn (<a title="LinkedIn" href="http://www.linkedin.com/in/ondkloss" target="_blank">Halvor Strand</a>)</li>
<li>Skype (<a title="Skype" href="skype:Ondkloss?add">Ondkloss</a>)</li>
<li>Twitter (<a title="Twitter" href="http://www.twitter.com/ondkloss" target="_blank">Ondkloss</a>)</li>
<li>Flickr (<a title="Flickr" href="http://www.flickr.com/photos/ondkloss/" target="_blank">Ondkloss</a>)</li>
</ul>
<div><strong>Teknologi:</strong></div>
<ul>
<li>TopCoder (<a title="TopCoder" href="http://www.topcoder.com/tc?module=MemberProfile&amp;cr=22774764" target="_blank">Shrug</a>)</li>
<li>SPOJ (<a title="SPOJ" href="https://www.spoj.pl/users/shrug/" target="_blank">Shrug</a>)</li>
<li>Project Euler (<a title="Project Euler" href="http://projecteuler.net/index.php?section=profile&amp;profile=Shrug" target="_blank">Shrug</a>)</li>
</ul>
<div><strong>Fritid:</strong></div>
<ul>
<li>Squash (<a title="NTNUI Squash" href="http://www.ntnui.no/squash" target="_blank">NTNUI</a>)</li>
<li>Trening (<a title="NTNUI" href="http://www.ntnui.no/" target="_blank">NTNUI</a>)</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.halvorstrand.com/?feed=rss2&amp;p=1</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>levenshteinDistance</title>
		<link>http://www.halvorstrand.com/?p=70</link>
		<comments>http://www.halvorstrand.com/?p=70#comments</comments>
		<pubDate>Fri, 13 Nov 2009 11:58:35 +0000</pubDate>
		<dc:creator>Halvor Strand</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.halvorstrand.com/?p=70</guid>
		<description><![CDATA[	public static int levenshteinDistance(String a, String b)
	{
		int[][] c = new int[a.length()+1][b.length()+1];

		for(int i = 0; i ]]></description>
			<content:encoded><![CDATA[<pre class="brush:java">	public static int levenshteinDistance(String a, String b)
	{
		int[][] c = new int[a.length()+1][b.length()+1];

		for(int i = 0; i <= a.length(); i++)
			c[i][0] = i;

		for(int j = 0; j <= b.length(); j++)
			c[0][j] = j;

		for (int i = 1; i <= a.length(); i++)
            for (int j = 1; j <= b.length(); j++)
                    if (a.charAt(i-1) == b.charAt(j-1))
                    	c[i][j] = c[i-1][j-1];
                    else
                    	c[i][j] = Math.min(c[i-1][j] + 1, Math.min(c[i][j-1] + 1, c[i-1][j-1] + 1));

		return c[a.length()][b.length()];
	}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.halvorstrand.com/?feed=rss2&amp;p=70</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XKCD, Exploits of a Mom</title>
		<link>http://www.halvorstrand.com/?p=61</link>
		<comments>http://www.halvorstrand.com/?p=61#comments</comments>
		<pubDate>Fri, 13 Nov 2009 01:37:51 +0000</pubDate>
		<dc:creator>Halvor Strand</dc:creator>
				<category><![CDATA[Geeking]]></category>

		<guid isPermaLink="false">http://www.halvorstrand.com/?p=61</guid>
		<description><![CDATA[
XKCD
]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="Exploits of a Mom" src="http://imgs.xkcd.com/comics/exploits_of_a_mom.png" alt="" width="584" height="180" /></p>
<p><a title="XKCD" href="http://www.xkcd.com/">XKCD</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.halvorstrand.com/?feed=rss2&amp;p=61</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lcs</title>
		<link>http://www.halvorstrand.com/?p=59</link>
		<comments>http://www.halvorstrand.com/?p=59#comments</comments>
		<pubDate>Fri, 13 Nov 2009 01:31:17 +0000</pubDate>
		<dc:creator>Halvor Strand</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.halvorstrand.com/?p=59</guid>
		<description><![CDATA[	// time: Ο(length(a)*length(b))
	// space: Θ(length(a)*length(b))
	public static int lcs(String a, String b)
	{
		int[][] c = new int[a.length()+1][b.length()+1];

		for (int i = 1; i ]]></description>
			<content:encoded><![CDATA[<pre class="brush:java">	// time: Ο(length(a)*length(b))
	// space: Θ(length(a)*length(b))
	public static int lcs(String a, String b)
	{
		int[][] c = new int[a.length()+1][b.length()+1];

		for (int i = 1; i <= a.length(); i++)
            for (int j = 1; j <= b.length(); j++)
                    if (a.charAt(i-1) == b.charAt(j-1))
                    	c[i][j] = c[i-1][j-1] + 1;
                    else
                    	c[i][j] = Math.max(c[i-1][j], c[i][j-1]);

		return c[a.length()][b.length()];
	}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.halvorstrand.com/?feed=rss2&amp;p=59</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gcd lcm</title>
		<link>http://www.halvorstrand.com/?p=56</link>
		<comments>http://www.halvorstrand.com/?p=56#comments</comments>
		<pubDate>Sat, 24 Oct 2009 08:45:15 +0000</pubDate>
		<dc:creator>Halvor Strand</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.halvorstrand.com/?p=56</guid>
		<description><![CDATA[public static int gcd(int a, int b)
{
	if(b == 0) return a;
	return gcd(b, a%b);
}

public static int lcm(int a, int b)
{
	return Math.abs(a*b)/gcd(a,b);
}
]]></description>
			<content:encoded><![CDATA[<pre class="brush:java">public static int gcd(int a, int b)
{
	if(b == 0) return a;
	return gcd(b, a%b);
}

public static int lcm(int a, int b)
{
	return Math.abs(a*b)/gcd(a,b);
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.halvorstrand.com/?feed=rss2&amp;p=56</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>isPowerOfTwo</title>
		<link>http://www.halvorstrand.com/?p=53</link>
		<comments>http://www.halvorstrand.com/?p=53#comments</comments>
		<pubDate>Sat, 17 Oct 2009 02:30:36 +0000</pubDate>
		<dc:creator>Halvor Strand</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.halvorstrand.com/?p=53</guid>
		<description><![CDATA[public static boolean isPowerOfTwo(int x)
{
	return ((x &#038; (x-1)) == 0);
}
]]></description>
			<content:encoded><![CDATA[<pre class="brush:java">public static boolean isPowerOfTwo(int x)
{
	return ((x &#038; (x-1)) == 0);
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.halvorstrand.com/?feed=rss2&amp;p=53</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>primeFactorize</title>
		<link>http://www.halvorstrand.com/?p=47</link>
		<comments>http://www.halvorstrand.com/?p=47#comments</comments>
		<pubDate>Sat, 17 Oct 2009 02:23:23 +0000</pubDate>
		<dc:creator>Halvor Strand</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.halvorstrand.com/?p=47</guid>
		<description><![CDATA[public static Vector&#60;Integer&#62; primeFactorize(int x)
{
	Vector&#60;Integer&#62; factors = new Vector&#60;Integer&#62;();

	for(int i = 2; i  1)
		factors.add(x);

	return factors;
}
]]></description>
			<content:encoded><![CDATA[<pre class="brush:java">public static Vector&lt;Integer&gt; primeFactorize(int x)
{
	Vector&lt;Integer&gt; factors = new Vector&lt;Integer&gt;();

	for(int i = 2; i <= Math.sqrt(x); i++)
	{
		while(x%i == 0)
		{
			factors.add(i);
			x /= i;
		}
	}

	if(x > 1)
		factors.add(x);

	return factors;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.halvorstrand.com/?feed=rss2&amp;p=47</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>isPrime</title>
		<link>http://www.halvorstrand.com/?p=41</link>
		<comments>http://www.halvorstrand.com/?p=41#comments</comments>
		<pubDate>Wed, 22 Jul 2009 19:46:01 +0000</pubDate>
		<dc:creator>Halvor Strand</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.halvorstrand.com/?p=41</guid>
		<description><![CDATA[	public static boolean isPrime(int x)
	{
		if(x < 3)
			return (x == 2);

		for(int i = 3; i ]]></description>
			<content:encoded><![CDATA[<pre class="brush:java">	public static boolean isPrime(int x)
	{
		if(x < 3)
			return (x == 2);

		for(int i = 3; i <= Math.sqrt(x); i++)
			if(x % i == 0)
				return false;

		return true;
	}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.halvorstrand.com/?feed=rss2&amp;p=41</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XKCD, Compiling</title>
		<link>http://www.halvorstrand.com/?p=22</link>
		<comments>http://www.halvorstrand.com/?p=22#comments</comments>
		<pubDate>Mon, 06 Jul 2009 11:18:23 +0000</pubDate>
		<dc:creator>Halvor Strand</dc:creator>
				<category><![CDATA[Geeking]]></category>
		<category><![CDATA[Comic]]></category>
		<category><![CDATA[XKCD]]></category>

		<guid isPermaLink="false">http://www.halvorstrand.com/?p=22</guid>
		<description><![CDATA[
XKCD
]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="Compiling" src="http://imgs.xkcd.com/comics/compiling.png" alt="" width="206" height="180" /></p>
<p><a title="XKCD" href="http://www.xkcd.com/">XKCD</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.halvorstrand.com/?feed=rss2&amp;p=22</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
