title: how to find length till specific value in an array in java
body: <p>In a number of array i need length till max value without using sort and </p>
  
  <blockquote>
    <p>{6,8,2,7,10,3,1}</p>
  </blockquote>
  
  <p>is it possible to return max-first minimum is that array(10-2=8)?</p>