Course of Raku / Addendum 🆕 / Working with data / Lists, arrays, and hashes / Exercises

The most common element

Problem

Find the element that occurs most often in the list <a b a c a b> and print it. (a appears three times.)

Example

The program prints:

a

Solution

See the solution

Course navigation

Solution: Transpose a matrix   |   Solution: The most common element