title: Why i am not able to find index of an element in the vector?
body: <p>I am getting the <code>max</code> element right but not index of maximum element.index of element is coming out to be equal to <code>max</code> element.</p>
  
  <pre><code>long int maxi=*max_element(segments.begin(),segments.end());
  
  long int index=*find(segments.begin(),segments.end(),maxi);
  </code></pre>