Domanda di colloquio di CarWale

Find three unique elements resulting in target sum.

Risposta di colloquio

Anonimo

4 ago 2024

My first approach was to iterate array twice and in the inner loop maintain a hashmap to find triplets resulting in target sum. Here I made a mistake because instead of hashmap set is optimal data structure to be used. After explaining approach I was told to implement it using any online compiler.