Pregunta de entrevista de Google

Common interview problems like string processing. Remove repeated chars in a string.

Respuestas de entrevistas

Anónimo

4 oct 2015

One naive implementation is using LinkedHashSet, in Java. Add all characters of string in the set and then for every element of the set, add it to StringBuffer and return. Since LinkedHashSet maintains insertion order, if input is "aabcdc", output will be "abcd"

1

Anónimo

1 jun 2020

The key in generic questions like this, is to make sure to cover the fundamentals. There's usually a back-and-forth with the interviewer. Might be worth doing a mock interview with one of the Google Software Engineer Intern experts on Prepfully? Really helps to get some real-world practice and guidance. prepfully.com/practice-interviews

Anónimo

4 oct 2015

One naive implementation is using LinkedHashSet, in Java. Add all characters of string in the set and then for every element of the set, add it to StringBuffer and return. Since LinkedHashSet maintains insertion order, if input is "aabcdc", output will be "abcd"

1