Pregunta de entrevista de NVIDIA

Coding: 1. The two-sum problem (famous DSA problem), both on sorted and unsorted arrays. 2. In an array, for each number, find out if it is greater than all the numbers to the right of it. Then questions about time and space complexity of my solution.

Respuesta de la entrevista

Anónimo

6 dic 2023

I opened an online C++ compiler to solve it. I used two pointers for two-sum on a sorted array and map on an unsorted array, and the second one could be done by iterating over the array once from the right side.

Pregunta de entrevista en NVIDIA: Coding: 1. The two-sum problem (famous DSA problem), both on sorted and unsorted arrays. 2. In an array, for each number, find out if it is greater than all the numbers to the right of it. Then questions about time and space complexity of my solution. | Glassdoor