Domanda di colloquio di OpenText

Given an array having duplicate values, remove the duplicate values and also preserve the order without using any extra space. Ex: Input: [ 1, 3, 2, 3, 3, 4, 2, 1, 2 ] Output: [ 1, 3, 2, 4 ]

Risposta di colloquio

Anonimo

19 ago 2018

I have given a O(N^2) approach. The interviewer was satisfied.