Adding the code for the unique characters check util and test cases