Problem 1170 · Medium

Compare Strings by Frequency of the Smallest Character

For each query word, take the frequency of its smallest letter and count the words whose smallest-letter frequency is strictly higher. The visual shows a sorted list of frequencies with a binary-search boundary for each query.

Open the interactive visualisation