Sorting/Strings/hash26.c File Reference

Create a Hash table to support 26 elements for Bucket Sort. Enable Bucket Sort over a hash table with 26 buckets. More...


Functions

int numBuckets (int numElements)
 The number of buckets to use given the number of elements.
int hash (void *elt)
 Determine the means by which elements are converted to bucket indices.


Detailed Description

Create a Hash table to support 26 elements for Bucket Sort. Enable Bucket Sort over a hash table with 26 buckets.

Author:
George Heineman
Date:
6/15/08

Function Documentation

int hash ( void *  elt  ) 

Determine the means by which elements are converted to bucket indices.

Customized to properly encode elements in order within the buckets.

int numBuckets ( int  numElements  ) 

The number of buckets to use given the number of elements.

Parameters:
numElements number of elements in the collection to be sorted.

Algorithm Development Kit 1.0