Minimum Deletions to Make String K-Special at DE Shaw

Medium67.2% acceptance

This problem has 75.0% frequency at DE Shaw.

Problem Description

You are given a string `word` and an integer `k`. We consider `word` to be **k-special** if `|freq(word[i]) - freq(word[j])| <= k` for all indices `i` and `j` in the string. Here, `freq(x)` denotes the frequency of the character `x` in `word`, and `|y|` denotes the absolute value of `y`. Return _...

Read full problem and hints

Topics

Also asked at 2 companies


More DE Shaw Questions

View all DE Shaw questions