DEV Community

LeetCode in Ruby: 771 Jewels and Stones

Kaitian Xie on March 19, 2019

1 Line This approach is based on Rubyโ€™s String#count method. It takes the string j as the set of characters to count in the string s. Th...
Collapse
 
healeycodes profile image
Andrew Healey

Awesome solution. This is my favourite problem on LeetCode. Itโ€™s a simple introduction to hashmaps and why theyโ€™re amazing ๐Ÿ‘