2019-3: Grade Distribution

The school's administrative department wants to publish some simple statistics.

Given a non-empty character vector of single-letter grades, produce a 3-column, 5-row, alphabetically-sorted matrix of each grade, the number of occurrences of that grade, and the percentage (rounded to 1 decimal position) of the total number of occurrences of that grade.

The table should have a row for each grade even if there are no occurrences of a grade.

Note: due to rounding the last column might not total 100%.

Examples

Implementation

You can also run the tests via ⌘/shift + enter