Question d’entretien chez Intrepid Pursuits

Reverse an array without using the reverse method, without using a second array, and without duplicating any of the values.

Réponses aux questions d'entretien

Utilisateur anonyme

15 févr. 2018

def reverseNoDuplication(s): m = len(s) for i in range(m - 1, -1, -1): if s[i] not in s[m:]: s.append(s[i]) return s[m:]

Utilisateur anonyme

7 août 2018

var arr = [1,2,3,4,5,6] for i in 0..

Utilisateur anonyme

7 août 2018

var arr = [1,2,3,4,5,6] for i in 0..

Utilisateur anonyme

7 août 2018

var arr = [1,2,3,4,5,6] for i in 0..