p of the algorithm (encode, coalesce duplicates, and so on), follow the same process:</p>

<ul>
  <li>Identify the next small task of the algorithm to implement.</li>
  <li>Define a new helper function to accomplish that task.</li>
  <li>Write student tests that confirm the expected behavior of the new function.</li>
  <li>Fill in the code for your helper function, debugging as you go. Continue writing code and debugging until you have passed all the tests from the previous step.</li>
  <li>Rinse and repeat