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