CGI interview question

Java programs like count of duplicates in a string checking the symmetry in an array