Common Characters
L2 Easy Strings
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