Pergunta de entrevista da empresa ServiceNow

It was 3 interview process all 3 are technical and questions are mainly coding and selenium based. 1coding questions to Map the occurrence of character 1. Print duplicates