parent
d9b9d4b5ca
commit
c8c5f36bfb
@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
id: 1
|
||||||
|
title: Histogram Stars
|
||||||
|
topics: [array]
|
||||||
|
difficulty: easy
|
||||||
|
---
|
||||||
|
|
||||||
|
## Question
|
||||||
|
|
||||||
|
```
|
||||||
|
'''
|
||||||
|
Given an array of integers, print out a histogram using the array. Include a base layer (all stars)
|
||||||
|
|
||||||
|
[5, 4, 0, 3, 4, 1] will result in the following:
|
||||||
|
|
||||||
|
******
|
||||||
|
*****
|
||||||
|
*
|
||||||
|
****
|
||||||
|
*****
|
||||||
|
**
|
||||||
|
'''
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
Print out a vertical version of the histogram.
|
||||||
|
|
||||||
|
*
|
||||||
|
** *
|
||||||
|
** **
|
||||||
|
** **
|
||||||
|
** ***
|
||||||
|
******
|
||||||
|
'''
|
||||||
|
```
|
Loading…
Reference in new issue