Sherlock and the Valid String, is a HackerRank problem from String Manipulation subdomain. In this post we will see how we can solve this challenge in C++

Problem Description

Sherlock considers a string to be valid if all characters of the string appear the same number of times. It is also valid if he can remove just character at index in the string, and the remaining ch ....

You can find the full details of the problem Sherlock and the Valid String at HackerRank

Solution: Please check the solution.cpp snippet for the solution.

Solution originally posted at: Github by @marinskiy