<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/algorithm</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 22 May 2013 16:47:11 GMT</pubDate>
<item>
<title>(Pascal) Ejercicio 33 - Algoritmo ordenamiento - MauricioM</title>
<link>http://snipplr.com/view/71090/ejercicio-33--algoritmo-ordenamiento/</link>
<description><![CDATA[ <p>Técnicas de Programación. Ejercicio 33 - Algoritmo selección (usando un array auxiliar)</p> ]]></description>
<pubDate>Wed, 08 May 2013 13:29:52 GMT</pubDate>
<guid>http://snipplr.com/view/71090/ejercicio-33--algoritmo-ordenamiento/</guid>
</item>
<item>
<title>(C++) Mutant Encryption Algorithm - eiger824</title>
<link>http://snipplr.com/view/70034/mutant-encryption-algorithm/</link>
<description><![CDATA[ <p>This piece of code is aimed to encrypt passwords, but this time it won't return a single character array, but a constantly-changing matrix which contains the password.</p> ]]></description>
<pubDate>Thu, 21 Feb 2013 08:18:26 GMT</pubDate>
<guid>http://snipplr.com/view/70034/mutant-encryption-algorithm/</guid>
</item>
<item>
<title>(PHP) Fake Credit Card Checker - quixrick</title>
<link>http://snipplr.com/view/69142/fake-credit-card-checker/</link>
<description><![CDATA[ <p>This function checks to see if a credit card number cannot possibly be valid.  Note: It does NOT check if a card is valid.  A card number can pass this check and still be invalid, but this script will identify card numbers that cannot possibly be valid.</p> ]]></description>
<pubDate>Tue, 18 Dec 2012 08:55:10 GMT</pubDate>
<guid>http://snipplr.com/view/69142/fake-credit-card-checker/</guid>
</item>
<item>
<title>(Java) Quicksort in Java, with Enforced Suckitude - rtperson</title>
<link>http://snipplr.com/view/64808/quicksort-in-java-with-enforced-suckitude/</link>
<description><![CDATA[ <p>It's no fun implementing QuickSort unless you can force it out of its blister-fast, O(n log n) speed and humiliate it with its worst-case, O(n^2) runtime. So that's what I set out to do.  

My naive partition simply pivots around the low item, but my randomized partition defeats the sucky inputs by choosing a random pivot. (If you're interested in checking out a QuickSort which naively partitions until it hits an attempt to get it to run in quadratic time, check out IntroSort -- which simply  fails over to Merge Sort when it exceeds its optimal recursion depth.)</p> ]]></description>
<pubDate>Tue, 08 May 2012 00:02:25 GMT</pubDate>
<guid>http://snipplr.com/view/64808/quicksort-in-java-with-enforced-suckitude/</guid>
</item>
<item>
<title>(JavaScript) JavaScript Binary Search - jatkins</title>
<link>http://snipplr.com/view/64757/javascript-binary-search/</link>
<description><![CDATA[ <p>Released into the public domain.</p> ]]></description>
<pubDate>Fri, 27 Apr 2012 07:18:43 GMT</pubDate>
<guid>http://snipplr.com/view/64757/javascript-binary-search/</guid>
</item>
<item>
<title>(JavaScript) insertion sort - eryoav</title>
<link>http://snipplr.com/view/63700/insertion-sort/</link>
<description><![CDATA[ <p>insertion sort</p> ]]></description>
<pubDate>Sat, 03 Mar 2012 17:38:33 GMT</pubDate>
<guid>http://snipplr.com/view/63700/insertion-sort/</guid>
</item>
<item>
<title>(JavaScript) Binary Search - eryoav</title>
<link>http://snipplr.com/view/63573/binary-search/</link>
<description><![CDATA[ <p>simple binary search algorithm</p> ]]></description>
<pubDate>Sat, 25 Feb 2012 17:57:38 GMT</pubDate>
<guid>http://snipplr.com/view/63573/binary-search/</guid>
</item>
<item>
<title>(Java) Quick Sort - jsmith</title>
<link>http://snipplr.com/view/62448/quick-sort/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 10 Jan 2012 18:28:42 GMT</pubDate>
<guid>http://snipplr.com/view/62448/quick-sort/</guid>
</item>
<item>
<title>(Java) Selection sort - jsmith</title>
<link>http://snipplr.com/view/62447/selection-sort/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 10 Jan 2012 18:28:40 GMT</pubDate>
<guid>http://snipplr.com/view/62447/selection-sort/</guid>
</item>
<item>
<title>(Java) Merge Sort - jsmith</title>
<link>http://snipplr.com/view/62446/merge-sort/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 10 Jan 2012 18:28:38 GMT</pubDate>
<guid>http://snipplr.com/view/62446/merge-sort/</guid>
</item>
<item>
<title>(Java) Insertion Sort - jsmith</title>
<link>http://snipplr.com/view/62445/insertion-sort/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 10 Jan 2012 18:28:24 GMT</pubDate>
<guid>http://snipplr.com/view/62445/insertion-sort/</guid>
</item>
<item>
<title>(Java) Bubble Sort - jsmith</title>
<link>http://snipplr.com/view/62444/bubble-sort/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 10 Jan 2012 18:28:10 GMT</pubDate>
<guid>http://snipplr.com/view/62444/bubble-sort/</guid>
</item>
<item>
<title>(C) Dijkstra\'s Shortest Path algorithm - stakisko</title>
<link>http://snipplr.com/view/60663/dijkstras-shortest-path-algorithm/</link>
<description><![CDATA[ <p>Its Dijkstra's Shortest Path algorithm written in C. Reads from a file the nodes and the connected edges and implements Dijkstra's algorithm. I am uploading for your comments in my code. Thank you.

Files content should be in the format:   
n N   
startNode endNode distance   
startNode endNode distance   
.   
.   
.   
startNode endNode distance   
   
where n is the total number of Nodes and N is the total number of Acnes.</p> ]]></description>
<pubDate>Wed, 09 Nov 2011 22:37:02 GMT</pubDate>
<guid>http://snipplr.com/view/60663/dijkstras-shortest-path-algorithm/</guid>
</item>
<item>
<title>(Haskell) Haskell 99 Problems, numbers 1 through 9 - rtperson</title>
<link>http://snipplr.com/view/58509/haskell-99-problems-numbers-1-through-9/</link>
<description><![CDATA[ <p>I had originally started these problems from #10 (Run-length encoding). I went back and did 1-8 for completeness.</p> ]]></description>
<pubDate>Thu, 08 Sep 2011 00:23:54 GMT</pubDate>
<guid>http://snipplr.com/view/58509/haskell-99-problems-numbers-1-through-9/</guid>
</item>
<item>
<title>(JavaScript) Bresenham\'s Line Algorithm - nefd</title>
<link>http://snipplr.com/view/58314/bresenhams-line-algorithm/</link>
<description><![CDATA[ <p>Code obtained from a [stackoverflow question](http://stackoverflow.com/questions/4672279/bresenham-algorithm-in-javascript). This is a javascript implementation of the [Bresenham line algorithm](http://en.wikipedia.org/wiki/Bresenham's_line_algorithm). Given two points, this function will return an array of coordinates which go from point A to point B, one step at a time.</p> ]]></description>
<pubDate>Wed, 31 Aug 2011 00:07:22 GMT</pubDate>
<guid>http://snipplr.com/view/58314/bresenhams-line-algorithm/</guid>
</item>
<item>
<title>(Haskell) Haskell 99 Problems - Number 20,  Arrowed! - rtperson</title>
<link>http://snipplr.com/view/58144/haskell-99-problems--number-20--arrowed/</link>
<description><![CDATA[ <p>problem 20, (*) Remove the K'th element from a list

    *Main> removeAt 1 "abcd"
        "acd"

Trivial using a pure function. A bit more challenging if you use this problem to work up your Arrow-fu.</p> ]]></description>
<pubDate>Thu, 25 Aug 2011 01:54:30 GMT</pubDate>
<guid>http://snipplr.com/view/58144/haskell-99-problems--number-20--arrowed/</guid>
</item>
<item>
<title>(Haskell) Haskell 99 Problems - Number 18 and 19 - rtperson</title>
<link>http://snipplr.com/view/58064/haskell-99-problems--number-18-and-19/</link>
<description><![CDATA[ <p>Problem 18: Extract a slice from a list.

Given two indices, i and k, the slice is the list containing the elements between the i'th and k'th element of the original list (both limits included). Start counting the elements with 1.

Example:

    *Main> slice ['a','b','c','d','e','f','g','h','i','k'] 3 7
    "cdefg
  
9 Problem 19 - Rotate a list N places to the left.

    *Main> rotate ['a','b','c','d','e','f','g','h'] 3
    "defghabc"
 
    *Main> rotate ['a','b','c','d','e','f','g','h'] (-2)
    "ghabcdef"
(This one is so easy it feels like cheating...)</p> ]]></description>
<pubDate>Sun, 21 Aug 2011 01:58:02 GMT</pubDate>
<guid>http://snipplr.com/view/58064/haskell-99-problems--number-18-and-19/</guid>
</item>
<item>
<title>(Haskell) Haskell 99 Problems - Solutions to 11 and 12 - rtperson</title>
<link>http://snipplr.com/view/57309/haskell-99-problems--solutions-to-11-and-12/</link>
<description><![CDATA[ <p>problem 11, modified run-length encoding
========================================
If an element has no duplicates, mark it as such. 

Example:

    encodeModified "aaaabccaadeeee"

    [Multiple 4 'a',Single 'b',Multiple 2 'c',
        Multiple 2 'a',Single 'd',Multiple 4 'e']

problem 12, Decode a run-length encoded list. 
=============================================
Given a run-length code list generated as specified in problem 11. Construct its uncompressed version. 

Example:

    decodeModified 
       [Multiple 4 'a',Single 'b',Multiple 2 'c',
        Multiple 2 'a',Single 'd',Multiple 4 'e']

    "aaaabccaadeeee"</p> ]]></description>
<pubDate>Fri, 29 Jul 2011 08:03:55 GMT</pubDate>
<guid>http://snipplr.com/view/57309/haskell-99-problems--solutions-to-11-and-12/</guid>
</item>
<item>
<title>(Haskell) Run-Length Encoding in Haskell - rtperson</title>
<link>http://snipplr.com/view/57300/runlength-encoding-in-haskell/</link>
<description><![CDATA[ <p>Problem 10 of the famous 99 Problems. I got 99 problems, but a Lisp ain't one.</p> ]]></description>
<pubDate>Fri, 29 Jul 2011 06:08:49 GMT</pubDate>
<guid>http://snipplr.com/view/57300/runlength-encoding-in-haskell/</guid>
</item>
<item>
<title>(Java) Travelling Salesman Problem >> Java - s1w</title>
<link>http://snipplr.com/view/55188/travelling-salesman-problem--java/</link>
<description><![CDATA[ <p>[start_tsp.bat] file should be made for launching:
start "output" java -jar TSP.jar</p> ]]></description>
<pubDate>Mon, 13 Jun 2011 04:11:38 GMT</pubDate>
<guid>http://snipplr.com/view/55188/travelling-salesman-problem--java/</guid>
</item>
</channel>
</rss>