Skip to content

Bug Report for longest-repeating-substring-with-replacement #4801

@c-git

Description

@c-git

Bug Report for https://neetcode.io/problems/longest-repeating-substring-with-replacement

Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.

Typo in hints. Hint 1 says unique where is seems to me that it should say identical.

Hint 1

Which characters would you replace in a string to make all its characters unique? Can you think with respect to the frequency of the characters?

Hint 2

It is always optimal to replace characters with the most frequent character in the string. Why? Because using the most frequent character minimizes the number of replacements required to make all characters in the string identical. How can you find the number of replacements now?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions