{'fraction_non_alphanumeric': 0.02, 'fraction_numerical': 0.005, 'mean_word_length': 5.260416666666667, '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}}
Analysis on 2-element insertion sort algorithm

This paper proposes a 2-element insertion sort algorithm, an improved algorithm on the direct insertion sort, gives the algorithm design idea and the description in C. After analyzes comparatively the time complexity and space complexity of the algorithms, the paper summarizes the pros and cons of the 2-element insertion sort algorithm compared with the original one, so as to giving a theoretical basis for the direct insertion sort algorithm optimization, and playing a guiding role in teaching the relevant chapters in “Data Structure” curriculum.