Question d’entretien chez Josh Software

How to reverse a array

Réponse à la question d'entretien

Utilisateur anonyme

23 août 2024

think of python one can use :- a = [1,2,3,4,5] n = len(a) left = 0 right = n-1 while left < right: a[left], a[right] = a[right], a[left] left += 1 right -= 1 print(a)