title: Minimum number of increment-other operations to make all array elements equal
body: <p>I am reading <a href="https://www.geeksforgeeks.org/minimum-number-increment-operations-make-array-elements-equal/" rel="nofollow noreferrer">this</a> question in geek for geeks site. </p>
  
  <p>The question is about finding the number of minimum moves in an array so all elements are equal.</p>
  
  <blockquote>
    <p>We are given an array consisting of n elements. At each operation you
    can select any one element and increase rest of n-1 elements by 1. You
    have to make all elements equal performing such operation as many
    times you wish. Find the minimum number of operations needed for this.</p>
  </blockquote>
  
  <pre><code>Examples:
  
  Input : arr[] = {1, 2, 3}
  Output : Minimum Operation = 3
  Explanation : 
  operation | increased elements | after increment
      1     |    1, 2            | 2, 3, 3
      2     |    1, 2            | 3, 4, 3
      3     |    1, 3            | 4, 4, 4
  
  Input : arr[] = {4, 3, 4}
  Output : Minimum Operation = 2
  Explanation : 
  operation | increased elements | after increment
       1    |    1, 2           | 5, 4, 4
       2    |    2, 3           | 5, 5, 5
  </code></pre>
  
  <p>The link explains we have to use the formula <code>minOperation = sum - (n * small)</code> to get the answer, where sum is the total of all elements in array, n is the number of elements in array and small is the least element in array.</p>
  
  <p>Can you please help me in understanding what the formula indicates <code>minOperation = sum - (n * small)</code>? and how it solves the question?</p>