title: Which STL to use to find index by value in O(1) in C++
body: <p>Say I have an array <code>arr[] = {1 , 3 , 5, 12124, 24354, 12324, 5}</code></p>
  
  <p>I want to know the index of the value <code>5</code>(i.e, 2) in <code>O(1)</code>.<br>
  How should I go about this?</p>
  
  <p>P.S :<br>
  1. Throughout my program, I shall be finding only indices and not the vice versa (getting the value by index).<br>
  2. The array can have duplicates.</p>