## Bucket Sort algorithm in JavaScript

Bucket (bin) sort is a sorting algorithm that parts an array into buckets. Each of these are sorted recursively with the bucket sorting algorithm. The basic procedure of Bucket Sort is: 1. Create an empty array 2. Loop through the original array and put each object in a “bucket” 3. Sort each of the non-empty [...]

## Bubble Sort Algorithm in JavaScript

Bubble Sort is a very simple sorting algorithm. It works by stepping through a list to be sorted repeatedly while comparing each pair of coinsiding items and switching them if they are ordered incorrectly. This is a useful algorithm for doing simple comparisons in lists, but there are much more efficient algorithms for larger lists. [...]

## Quick-Find Algorithm in JavaScript

Here is my (quickly thrown together) simple implementation of the quick-find algorithm. For more information on the algorithm and the Disjoint-set data structure (quick-find performs some useful operations on this type of data structure) check out the Wikipedia page on Disjoint-set data structure here. var numArray; function QuickFindUF(numToFind) {     numArray = new Array(numToFind);    [...]

Tags: , , ,

## Programming BASIC and Sorting (Video)

Programming in BASIC on a BBC microcomputer, showcasing different sorting algorithms. Programming BASIC and Sorting (youtube.com)

## Understanding Fast Inverse Square Root (as used in the game Quake)

“An article and research paper describe a fast, seemingly magical way to compute the inverse square root (1/sqrt(x)), used in the game Quake. I’m no graphics expert, but appreciate why square roots are useful. The Pythagorean theorem computes distance between points, and dividing by distance helps normalize vectors. (Normalizing is often just a fancy term [...]

## Understanding the Fourier transform

“A very long time ago, I was curious how to detect the strength of the bass and treble in music, in order to synchronize some graphical effects. I had no idea how to do such a thing, so I tried to figure it out, but I didn’t get very far. Eventually I learned that I [...]

## Really Good Resource for Sorting Algorithms

This is something definitely worth sharing, very useful for anyone who wants to learn more about different sorting algorithms.  If you want to learn more about different types of sorting this is the perfect place to start. It even has animations to show how different algorithms work and pseudo-code to help you get started with [...]

Tags: ,

## America’s Most Important Algorithm

“Yesterday the Census Bureau announced the new apportionment of the 435 representatives to states based on the 2010 census. Illinois lost one representative. Texas gains four. Not only do these affect the makeup of the House of Representatives but also the Electoral College that chooses the president. Since 1940 the apportionment is not done by [...]

Tags: , ,

## Beginning with Big O Notation

What is it? Big O Notation describes the limiting behavior of a function when the argument trends toward a certain value. Basically, it helps to describe the complexity and performance of an algorithm. This notation can also help to understand the execution time needed or space required by an algorithm. O(1) This describes an algorithm [...]

## What do sorting algorithms sound like?

Rudy Andrut has auralized a bunch of sorting algorithms based on their visualizations. They sound pretty amazing! Also, if you are looking for the visualizations that were previously done check them out here: sorting algorithm visualizations (sortvis.org). Here are the videos:

Tags: , ,