Explanation

525.Print a Butterfly Star Pattern

Easy
Given n, return the 2n rows of a butterfly: a left wing and a right wing of stars that grow towards the middle, meet in two full rows, and then shrink back. Each row has three parts — a wing, a gap and an identical wing — and the gap shrinks by exactly as much as the wings grow, so row widthConstant Row WidthEvery row is the same number of characters wide (here 2n), because what one part gains another part loses. stays fixed at 2n. Seeing a row as repeated parts is the key to most "symmetric" patterns.

Example 1:

Input: n = 3

Output: ["* *","** **","******","******","** **","* *"]

Example 2:

Input: n = 1

Output: ["**","**"]

+ 4 hidden test cases run on Submit.

Constraints:

  • ●1 ≤ n ≤ 20

n =

3