Domanda di colloquio di Route1

The following code creates an unnecessary temporary variable. How would you change it to be more efficient? C++ code that searches an unsorted list...

Risposta di colloquio

Anonimo

21 mar 2014

If efficiency is so important that you want to save the cycles in instantiating a new variable, you will save a lot more by using a hash map for the data structure in the first place.

1