Pergunta de entrevista da empresa Microsoft

The interviewer asked me how I would remove a specific character from a character array.

Respostas da entrevista

Sigiloso

28 de jan. de 2019

Iterate through the array, and for every character not equal to the specific character in question append it to a dynamic data structure (I used ArrayList). Return the data structure after you finish iterating through the original character array.

Sigiloso

19 de fev. de 2019

I wonder if they wanted you to use no extra space instead.you could do by keeping track of how many of such character exist and shift the other characters to left accordingly and resize and return.