Count Strings Hackerrank Solution