Level: Moderate

Link: https://www.hackerrank.com/challenges/gem-stones