Problem link I did not find any better solution in the discuss section of leetcode that's why posting here.
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
Problem link I did not find any better solution in the discuss section of leetcode that's why posting here.
Name |
---|
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