"pqqp" the earliest letter is p, so the weight is 2; in "zebra" it is a, so the weight is 1.
You get two lists of strings, probes and pool. For each string in probes, count how many strings in pool have a **strictly greater** weight.
Return the counts in the same order as probes.probes=["cab", "bbbz"], pool=["xaax", "q", "aaab", "ddd"] → [3, 0]
Weights in pool: in xaax the smallest letter a occurs 2 times, q has 1, aaab has 3, ddd has 3. The weight of cab is 1, so three words are heavier. The weight of bbbz is 3, and no word is heavier.
probes=["m"], pool=["zz", "yxy"] → [1]
The weight of m is 1. zz weighs 2, while in yxy the smallest letter x occurs once, so it weighs 1. Only zz is strictly heavier.
probes ≤ 10⁴pool ≤ 10⁴probes=["cab", "bbbz"], pool=["xaax", "q", "aaab", "ddd"]
[3, 0]
Run checks the first 3 tests in your browser. Submit checks all 94 tests on the server, hidden ones included.