Finding Distinct Letters in a Set
Bill has found a set. The set consists of small English letters. Bill carefully wrote out all the letters from the set in one line, separated by a comma. He also added an opening curved bracket at the beginning of the line and a closing curved bracket at the end of the line. Unfortunately, from time to time Bill would forget writing some letter and write it again. Help Bill to count the total number of distinct letters in his set.
Given a string of set format set_str, return an integer of total number of distinct letters from set.
Example 1
Input:
{b, a, b, a}
Output:
2
main.cpp
C++
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.