Question d’entretien chez NVIDIA

Find in the array 2 elements whose sum is equal to a given constant

Réponse à la question d'entretien

Utilisateur anonyme

9 janv. 2025

I used a dictionary For each member of the array I checked whether the constant minus the member is in the dictionary, if so we return the indexes we saved, if not we add the number to the dictionary

1