Common Characters

L2 Easy Strings
Concept
Treat a string as a collection of characters and the same set tools apply — even for words.
Return the number of distinct letters that appear in both s and t. A letter shared just once still counts as one.
Examples
▸ s = "read", t = "dear"
→ 4
▸ s = "cat", t = "dog"
→ 0
▸ s = "ape", t = "apple"
→ 3
Progressive Hints
Hint 1 · Nudge
Once a string becomes a bag of characters, the same set tools from numbers apply.
Hint 2 · Plan
Treat each string as a set of its characters, compute the intersection of the two sets, and return its size.
Hint 3 · Approach
charsS = set of s's characters; charsT = set of t's characters. Return the size of their overlap.
Output
// Run your code to see the output here.