Pregunta de entrevista de ZopSmart

Write a program to find duplicate characters in String

Respuesta de la entrevista

Anónimo

19 mar 2022

1. Run a for loop till string length. 2. Check on every iteration if index of the current charcter is the last character in entire string. 3. If above condition is false then it means duplicate so print character.. and then assign the string a new value by replacing all occurrence of that character by calling replaceall and set the loop counter variable to 0 again.