Jewels And Stones

easy
1. You will be given two strings jewels(J) and stones(S) 2. Every character in string S that exists in string J, is a jewel. 3. You need to return number of such stones. 4. Input and output is handled for you 5. It is a functional problem ,please do not modify main() Note: Both jewels and stones are case sensitive

Input Format

Input is handled for you.

Output Format

Output is handled for you.

Constraints

Both jewels and stones are case sensitive
 If no stones are found to be jewels, return 0

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
aEe
EedeaGdeGHg
Output
5
Previous
Is Binary Tree Heap
Next
K Closest Points To Origin

Related Questions