Java program to check if a string can be made valid by removing at most 1 character using hashmap .
import java . util . HashMap ; import java . util . Iterator ; import java . util . Map ; public class AllCharsWithSameFrequencyWithOneVarAllowed {