How to resolve the algorithm Hex words step by step in the RPL programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Hex words step by step in the RPL programming language

Table of Contents

Problem Statement

For the purposes of this task a hex word means a word which (in lower case form) consists entirely of the letters a, b, c, d, e and f. Using unixdict.txt, find all hex words with 4 letters or more. Convert each such word to its decimal equivalent and compute its base 10 digital root. Display all three in increasing order of digital root and show the total count of such words. Keeping only words which contain at least 4 distinct letters, display the same statistics but in decreasing order of decimal equivalent together with their total count.

Let's start with the solution: