Class Solution
java.lang.Object
g0701_0800.s0771_jewels_and_stones.Solution
771 - Jewels and Stones.<p>Easy</p>
<p>You’re given strings <code>jewels</code> representing the types of stones that are jewels, and <code>stones</code> representing the stones you have. Each character in <code>stones</code> is a type of stone you have. You want to know how many of the stones you have are also jewels.</p>
<p>Letters are case sensitive, so <code>"a"</code> is considered a different type of stone from <code>"A"</code>.</p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> jewels = “aA”, stones = “aAAbbbb”</p>
<p><strong>Output:</strong> 3</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> jewels = “z”, stones = “ZZ”</p>
<p><strong>Output:</strong> 0</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 <= jewels.length, stones.length <= 50</code></li>
<li><code>jewels</code> and <code>stones</code> consist of only English letters.</li>
<li>All the characters of <code>jewels</code> are <strong>unique</strong>.</li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
numJewelsInStones
-