We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Strings
- String Construction
- Discussions
String Construction
String Construction
Sort by
recency
|
985 Discussions
|
Please Login in order to post a comment
Approach:
I'm quite suprised how easy this problem is given that it's worth 25 points. Here's my Python solution!
The solution here is to count the number of unique occurrences of the characters, here is the explanation : https://youtu.be/UqqNcIUnsv8
solution 1 : using map
solution 2 : using set
or
My answer with Typescript,