{'fraction_non_alphanumeric': 0.013812154696132596, 'fraction_numerical': 0.0, 'mean_word_length': 4.708661417322834, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Heapsort using Multiple Heaps

We present a modification of the in-place algorithm HEAPSORT using multiple heaps. Our algorithm reduces the number of swaps made between the elements of the heap structure after the removal of the root at the cost of some extra comparisons. In order to retain the property of sorting in-place, we perform a kind of multiplexing and store all heaps in a single array such that no extra space is required. We also present a theoretical analysis of our algorithm, providing a specific formula for computing the optimal number of heaps to be used, and back up our theoretical findings with an experimental study, which shows the superiority of our approach with respect to the classical HEAPSORT.