title: time complexity issues for set and vector stl c++
body: <p>what is the difference in time between accessing element in a set and vector and between for example :</p>
  
  <pre><code>int val = 5;
  set &lt;int&gt; a;
  int x = *lower_bound(a.begin(), a.end(), val); // i got time limit exceed 
  int y = *a.lower_bound(val); // i got accepted time
  </code></pre>