Problem link I did not find any better solution in the discuss section of leetcode that's why posting here.
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Problem link I did not find any better solution in the discuss section of leetcode that's why posting here.
Название |
---|
It is very disappointed to see that useless blog gets upvotes and a lot of people comment on those blogs but I even did not got any answer of my genuine problem. I was thinking that there are so many genius coders that will answer my problem. Shame on you CodeForces community.
Sometimes the comunity is obviously being biased, but let not just focus on the vote since it is not that important, compared to the important of current knowledge — which can be easily comprehend through the color.
What's the need of it? You can write simple O(n^3) solution.
Even if sometimes gray coders make stupid questions, we should not just be so mean to those new leaner about everything. Sometimes they just curious to ask to become better. Chill :/
I don't think I can solve it
I am curious if we can really solve in linear tho hmmmm
By quick thinking, $$$O(n^2 + alphabet)$$$ is possible if you iterating each letter and increase its frequency while maintaining the maximum and the minimum
Yes, it is easy to do that. But how can we solve it less than n^2?
I am pretty sure with this kind of problem we can do $$$O(n \sqrt{n})$$$ or faster, but it seems trickier than I thought it would