Turn survey results into a text bar chart. data is a list of [label, count] pairs.
Return one string per pair, in the given order: the label padded on the right with spaces to
the length of the longest label, then a single space, then count copies of #.
Examples
Input: data = [["tea", 3], ["coffee", 5]]
Output: ["tea ###", "coffee #####"]
Input: data = [["a", 1]]
Output: ["a #"]
Constraints
0 <= len(data) <= 1001 <= count <= 50; labels are non-empty and contain no spaces.
Goals
- Find the longest label before building any line
- Pad labels to a common width and draw bars with string repetition