Pergunta de entrevista da empresa Morgan Stanley

Onsite #7 Remove duplicates from a sorted array with O(1) space

Resposta da entrevista

Sigiloso

12 de nov. de 2018

Array is sorted that is the key here, We need a variable to hold current insert position in an array. Start iterate over an array and compare current and next elements. when they are not matching put it at insert position and then increment insert position and keep iterating over an array