{'fraction_non_alphanumeric': 0.011750881316098707, 'fraction_numerical': 0.0, 'mean_word_length': 5.406015037593985, '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}}
The design and coding of greedy algorithms revisited

In this paper we argue that the most typical instruction method used to teach greedy algorithms is inadequate at achieving certain learning goals and we present several contributions to alleviate this situation. Our first group of contributions highlights the role of selection functions and proposes separate treatment in their discovery and proof of optimality. For discovery, we outline some interesting cases of selection functions and for proofs, we examine the role of counterexamples. Furthermore, we argue that their separation provides more opportunities for instructional activities. Our second group of contributions concerns coding greedy algorithms. We discuss the role and adequacy of the template in current use, and also the role of sorting candidates and how to implement sorting.