# Algorithms

## Algorithm of the Week: Prim's Minimum Spanning Tree

Introduction Along with Kruskal’s minimum spanning tree algorithm, there’s another general algorithm that solves the problem. The algorithm of...

2 replies - 12921 views - 11/20/12 by Stoimen Popov in Articles

## Algorithm of the Week: Kruskal's Minimum Spanning Tree

Introduction One of the two main algorithms in finding the minimum spanning tree algorithms is the algorithm of Kruskal. Before getting into the details,...

0 replies - 10889 views - 11/13/12 by Stoimen Popov in Articles

## Algorithm of the Week: Minimum Spanning Tree

Introduction Here’s a classical task on graphs. We have a group of cities and we must wire them to provide them all with electricity. Out of all...

0 replies - 8078 views - 11/06/12 by Stoimen Popov in Articles

## Algorithm of the Week: Shortest Path in a Directed Acyclic Graph

Introduction We saw how to find the shortest path in a graph with positive edges using the Dijkstra’s algorithm. We also know how to find the shortest...

0 replies - 8330 views - 10/29/12 by Stoimen Popov in Articles

## The Algorithms of Memory

Originally posted by Eric Burnett, a software engineer at Google on thelowlyprogrammer.comThe human brain has the best storage system on the block in a lot of...

0 replies - 6306 views - 10/29/12 by Mitch Pronschinske in Articles

## Algorithm of the Week: Bellman-Ford Shortest Path in a Graph

Introduction As we saw in the previous post, Dijkstra's algorithm is very useful when it comes to finding all the shortest paths in a weighted graph....

1 replies - 15294 views - 10/22/12 by Stoimen Popov in Articles

## Algorithm of the Week: Dijkstra Shortest Path in a Graph

Introduction We already know how we can find the shortest paths in a graph starting from a given vertex. Practically we modified breadth-first search in...

0 replies - 16356 views - 10/15/12 by Stoimen Popov in Articles

## Algorithm of the Week: Shortest Path in a Graph

Introduction Since with graphs we can represent real-life problems it’s almost clear why we would need an efficient algorithm that calculates the...

3 replies - 12579 views - 10/09/12 by Stoimen Popov in Articles

## Algorithm of the Week: Graph Best-First Search

Introduction So far we know how to implement graph depth-first and breadth-first searches. These two approaches are crucial in order to understand graph...

0 replies - 7454 views - 09/25/12 by Stoimen Popov in Articles

## Algorithm Books Reviews

To be sure to be well prepared for an interview, I decided to read several Algorithms book. I also chosen books in order to have information about data...

1 replies - 9434 views - 09/17/12 by Baptiste Wicht in Articles

## 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...

4 replies - 14814 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 - 10577 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...

1 replies - 12002 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 - 4130 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 - 9429 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 - 6410 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 - 7134 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 - 10981 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 - 10128 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 - 21215 views - 07/23/12 by Stoimen Popov in Articles