BlackWaspTM
<< Previous | 1 | 2 | 3 | Next >> |
Stein's AlgorithmStein's Algorithm
Stein's algorithm provides an enhanced version of the Euclidean algorithm for calculating the greatest common divisor (GCD) for a pair of integers. Stein's algorithm provides greater efficiency by making use of the bitwise shift operators.
A Generic Circular BufferA Generic Circular Buffer
A circular buffer is a type of fixed size, first in, first out queue. The spaces in the buffer can be thought of as connected in a ring. Items in the buffer are never moved. Instead, changeable pointers are used to identify the head and tail of the queue.
Generic Multi-Level Undo and RedoGeneric Multi-Level Undo and Redo
Most modern software applications include undo and redo features. Undo allows one or more activities to be reverted. Redo allows previous undo actions to be reversed. This article explains how to create a generic, multi-level undo and redo class.
Dijkstra's AlgorithmDijkstra's Algorithm
Graph traversal algorithms are used to process a graph of interconnected nodes, visiting each node by following a set behaviour. Dijkstra's algorithm is such an algorithm. It determines the shortest path from a start point to all other nodes in a graph.
Determining if Values are CoprimeDetermining if Values are Coprime
Two integer values are said to be coprime, or relatively prime, when they share no common divisors other than the number one. This article describes the process for determining whether two positive values are coprime, with C# example code.
Euclid's AlgorithmEuclid's Algorithm
Euclid's algorithm, also known as the Euclidean algorithm, can be used to efficiently calculate the greatest common divisor (GCD) for two integer values. This article describes the algorithm and provides several C# methods that calculate the GCD.
The XOR Swap AlgorithmThe XOR Swap Algorithm
The XOR Swap algorithm provides a means to swap the values in two integer variables without requiring the use of a third, temporary variable. This algorithm is interesting to know, although its use is unnecessary in high-level languages.
Convert Text to Morse CodeConvert Text to Morse Code
Morse code is a standard encoding for letters, digits and some other characters that is ideally suited to radio transmissions and is used by amateur radio operators and pilots. This article describes a simple C# class for converting text to Morse code.
Displaying Relative TimeDisplaying Relative Time
When developing software that works with time stamped information, it is common to show the date and time at which an item was created or last updated. A user-friendly alternative is to display a relative time, such as "Two Hours Ago".
The Soundex AlgorithmThe Soundex Algorithm
Cultural differences and input errors can lead to words being spelled differently to a user's expectations. This makes it difficult to locate information quickly. The Soundex algorithm can alleviate this by assigning codes based upon the sound of words.
<< Previous | 1 | 2 | 3 | Next >> |