Route1 interview question

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

Interview Answer

Anonymous

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