1 2 3 4 5 6 7 8 9 10 | public class Solution { public int NumJewelsInStones( string jewels, string stones) { var list = from stone in stones where jewels.Any(jewel => stone == jewel) select stone; return list.Count(); } } |
No comments:
Post a Comment