Algorithms

  • submit to reddit

Algorithm of the Week: Graph Breadth First Search

Since we already know how to represent graphs, we can go further for some very simple approaches of walking through them. Passing by all the vertices of a...

2 replies - 9847 views - 09/10/12 by Stoimen Popov in Articles

Quicksort - the Easy Way

Quick sort is the fastest known comparision sort for arrays. To top it, it could be done in-place for arrays. For Linked Lists, Merge Sort might be a...

6 replies - 5863 views - 09/07/12 by Arun Manivannan in Articles

Algorithm of the Week: Graphs and their Representation

Introduction Although this post is supposed to be about algorithms I’ll cover more on graphs and their computer representation. I consider this very...

0 replies - 7989 views - 09/04/12 by Stoimen Popov in Articles

Exploring Streaming Algorithms - Part 1

From Wikipedia - "Streaming algorithms are algorithms for processing data streams in which the input is presented as a sequence of items and can be...

0 replies - 3239 views - 09/02/12 by Nishant Chandra in Articles

Algorithm of the Week: Finding the Lowest Common Ancestor

Introduction Here’s one task related to the tree data structure. Given two nodes, can you find their lowest common ancestor? As a matter of fact, this...

0 replies - 7158 views - 08/27/12 by Stoimen Popov in Articles

Algorithm of the Week: Algorithm Used for World Record Pi Calculations

The following algorithm is based on work of Ramanujan and has been used in several world-record calculations of pi. Initialize a0 = 6 – 4 √2 and y0 = √2...

0 replies - 5503 views - 08/20/12 by John Cook in Articles

Algorithm of the Week: Detecting and Breaking a Loop in a Linked List

Introduction Linked lists are one very common and handy data structure that can be used in many cases of practical programming. In this post we’ll...

0 replies - 5747 views - 08/14/12 by Stoimen Popov in Articles

Algorithm of the Week: Heap and Heapsort

Introduction Heapsort is one of the general sorting algorithms that performs in O(n.log(n)) in the worst-case, just like merge sort and quicksort, but sorts...

0 replies - 9101 views - 08/07/12 by Stoimen Popov in Articles

My Algorithm for the Travelling Salesman Problem

I was thinking about the Travelling Salesman problem this morning. I came up with an algorithm that permits a few nice optimizations. My guess is that...

1 replies - 8596 views - 07/27/12 by Shannon Behrens in Articles

Algorithm of the Week: Balancing a Binary Search Tree

Introduction The binary search tree is a very useful data structure, where searching can be significantly faster than searching into a linked list....

0 replies - 13314 views - 07/23/12 by Stoimen Popov in Articles

Algorithm of the Week: Niching in Genetic Algorithms

Niching is a term often used in the Evolutionary Algorithms literature and its significance and implications may become clear only after the researcher has...

0 replies - 4258 views - 07/16/12 by Amit Saha in Articles

Algorithm of the Week: Binary Search Tree

Introduction Constructing a linked list is a fairly simple task. Linked lists are a linear structure and the items are located one after another, each...

0 replies - 18058 views - 06/25/12 by Stoimen Popov in Articles

Algorithm of the Week: Closest Pairs

As I mentioned in a post a couple of days ago I’ve been writing the closest pairs algorithm in Haskell and while the brute force version works for small...

0 replies - 7078 views - 06/19/12 by Mark Needham in Articles

Algorithm of the Week: Linked List

Introduction The linked list is a data structure in which the items are ordered in a linear way. Although modern programming languages support very...

6 replies - 11048 views - 06/14/12 by Stoimen Popov in Articles

Algorithm of the Week: Stack and Queue

Introduction Every developer knows that computer algorithms are tightly related to data structures. Indeed many of the algorithms depend on a data...

2 replies - 14175 views - 06/08/12 by Stoimen Popov in Articles