Course of Raku / Addendum 🆕 / Working with data

Lists, arrays, and hashes

Exercises on shaping data: sorting and filtering lists, counting with hashes, combining structures, and using the zip metaoperator to line values up.

Exercises

This section contains 7 exercises. Examine all the topics of this section before doing the coding practice.

  1. The second-largest value
  2. Split into even and odd
  3. Merge two inventories
  4. Running totals
  5. Transpose a matrix
  6. The most common element
  7. Zip two lists into a hash

Course navigation

Solution: Run-length encoding   |   The second-largest value