ProxmapSort, or Proxmap sort, is a sorting algorithm that works by partitioning an array of data items, or keys, into a number of "subarrays" (termed buckets, in similar sorts). The name is short for computing a "proximity map," which indicates for each key K the beginning of a subarray where K will reside in the final sorted order. Keys are placed into each subarray using insertion sort. If keys are "well distributed" among the subarrays, sorting occurs in linear time. The computational complexity estimates involve the number of subarrays and the proximity mapping function, the "map key," used. It is a form of bucket and radix sort. Once a ProxmapSort is complete, ProxmapSearch can be used to find keys in the sorted array in time if the keys were well distributed during the sort. Both algorithms were invented in the late 1980s by Prof. Thomas A. Standish at the University of California, Irvine. Overview Basic strategy In general: Given an array A with n keys: map a key to a subarray of the destination array A2, by applying the map key function to each array item determine how many keys will map to the same subarray, using an array of "hit counts," H determine where each subarray will begin in the destination array so that each bucket is exactly the right size to hold all the keys that will map to it, using an array of "proxmaps," P for each key, compute the subarray it will map to, using an array of "locations," L for each key, look up its location, place it into that cell of A2; if it collides with a key already in that position, insertion sort the key into place, moving keys greater than this key to the right by one to make a space for this key. Since the subarray is big enough to hold all the keys mapped to it, such movement will never cause the keys to overflow into the following subarray. Simplied version: Given an array A with n keys Initialize: Create and initialize 2 arrays of n size: hitCount, proxMap, and 2 arrays of A.length: location, and A2. Partition: Using a carefully chosen mapKey function, divide the A2 into subarrays using the keys in A Disperse: Read over A, dropping each key into its bucket in A2; insertion sorting as needed. Collect: Visit the subarrays in order and put all the