Question d’entretien chez Bank of America

Remove duplicated char within a String

Réponses aux questions d'entretien

Utilisateur anonyme

5 avr. 2014

boolean array, O(n)

2

Utilisateur anonyme

20 mai 2016

s = 'ssammplee' sl = list(s) sl_dedup = [a for a, b in zip(sl[:-1], sl[1:]) if a!=b] + [sl[-1]] s_dedup = ''.join(sl_dedup)

Utilisateur anonyme

4 sept. 2019

function removeDuplicate string ){ var unique=''; for(var i=0; i