You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tech-interview-handbook/questions/01-histogram-stars.md

38 lines
389 B

---
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:
******
*****
*
****
*****
**
'''
```
## Follow Up
```
Print out a vertical version of the histogram.
*
** *
** **
** **
** ***
******
'''
```