Pocket Gems interview question

soring problem