Sum of Beauty of All Substrings
You are given a string s consisting of lowercase English letters. A beauty of a substring is the difference in frequencies between the most frequent and least frequent characters in that substring.
Return the sum of beauty of all possible substrings of the given string.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)