BlackWaspTM

This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

<< Previous | 1 | 2 | 3 | 4 | Next >> |
Ungrouping Page NumbersUngrouping Page Numbers
When users provide a set of page numbers, or similarly numbered items, it is common to allow the information to be entered as a comma-delimited list. Each item in that list could represent a single page or range of adjacent pages that will need to be converted to a simple list.
Page Number GroupingPage Number Grouping
When listing page numbers in document indexes or for printing, it is common to group adjacent pages. This article describes a method that creates such groupings from a simple collection of integers.
Binary Search AlgorithmBinary Search Algorithm
The binary search algorithm provides fast searching within sorted arrays or collections. This iterative approach to searching disregards approximately half of the values in the collection with each pass to give O(log n) scalability.
A Generic Priority QueueA Generic Priority Queue
A queue is a data structure that preserves the order of items added to it to give first in, first out, or FIFO, operation. A priority queue is similar but attaches a priority to each element, so that the more important items are extracted earlier.
Binary HeapsBinary Heaps
A binary heap is a data structure, based upon a complete binary tree, that allows the first item in an ordered set to be quickly extracted. Heaps are used in several popular algorithms, including the heapsort method for ordering elements in a collection.
Fisher-Yates-Durstenfeld ShuffleFisher-Yates-Durstenfeld Shuffle
Sometimes it is necessary to randomise the order of a sequence of values. The Fisher-Yates algorithm provides a paper-based method, which was later computerised by Richard Durstenfeld. This article implements the algorithm as a custom LINQ operator.
A Lazily Loaded Weakly Referenced CacheA Lazily Loaded Weakly Referenced Cache
Caching improves performance for data that is slow to obtain. Lazy initialisation can help performance and save resources for unused objects. Weak references allow early garbage collection. This article describes a cache class combining these concepts.
An Extensible Appointment Scheduling LibraryAn Extensible Appointment Scheduling Library
Scheduling software can be used to plan future appointments, including those appointments that repeat on a regular basis. This article describes a library with four types of scheduling rule and the potential for additional rules to be incorporated.
Stein&#39;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.
<< Previous | 1 | 2 | 3 | 4 | Next >> |