Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 480 Bytes

File metadata and controls

27 lines (23 loc) · 480 Bytes

Inverted Bar Chart

Easy


  1. You are given a number n, representing the size of array a.
  2. You are given n numbers, representing elements of array a.
  3. You are required to print an inverted bar chart representing value of arr a

Example 1:

Input:  n = 5, arr[] = {3, 1, 0, 7, 5}
Output:  
* *   * * 
*     * * 
*     * * 
      * * 
      * * 
      *   
      * 

Constraints:

1 <= n <= 30
0 <= n1, n2, .. n elements <= 10