Algorithm · Moveworks · Medium
Given a collection of strings named strings. For every string s: Tally how often each character occurs. Define M(s) as the set of characters with the greatest frequency in s; retain every character when there is a tie. Define the character proportion p(s) by: p(s) = maxCount(s) / len(s) Here, maxCount(s) denotes the highest frequency of any character in s. Next: Form the set C containing every string whose value of p(s) is the smallest. Ties must all be included. For each…
Checking your access…