title: How to write an vertical Histogram
body: <p>So, right now I managed to output the Histogram like this:</p>
  <p><img src="https://i.stack.imgur.com/BWi0s.png" alt="HistogramPic" /></p>
  <p>The code for this picture is as following:</p>
  <pre class="lang-java prettyprint-override"><code>int max = getBiggest(arr);
  int min = getSmallest(arr);
  int n = max / 50 + 1;
  for (int i = 0; i &lt; arr.length; i++) {
      for (int j = min; j &lt; arr[i]; j += n) {
          System.out.print(i + 1);         
      }
      System.out.println(&quot;(&quot; + arr[i] + &quot;)&quot;);     
  }
  </code></pre>
  <p>But my task is to output the Histogram like this:</p>
  <p><img src="https://i.stack.imgur.com/ejiz6.png" alt="HistogramVertical" /></p>
  <p>Can someone explain me please how to write this code?</p>