Wave Pattern

Hard
9 views 25 Jan 2026
* * *
* * * *
* *
* * * *
* * *
Sine wave simulation. Condition based on rows and columns: (i+j)%4 == 0 and (i+j)%4 == 2...

Sandglass Pattern

Hard
4 views 25 Jan 2026
* * * * *
* * * *
* * *
* *
*
* *
* * *
* * * *
* * * * *
Inverted triangle above, normal below. Mirror image vertically....

Heart Shape

Hard
5 views 25 Jan 2026
*** ***
***** *****
***********
*********
*******
*****
***
*
Mathematical pattern - calculate specific coordinates where stars are printed....

Swastik Pattern

Hard
5 views 25 Jan 2026
* * * * * *
* * * * * *
* * * * * * * *
* * *
* * *
* * * * * * * *
* * * * * *
* * * * * *
Complex pattern - middle row, middle column, and corners. By combining multi...

Number Square Border

Hard
4 views 25 Jan 2026
1 1 1 1 1
1 2 2 2 1
1 2 3 2 1
1 2 2 2 1
1 1 1 1 1
Boundary layer numbers. Distance from edge calculate karo: min(i, j, n-1-i, n-1-j) + 1...

Cross (X) Pattern

Medium
2 views 25 Jan 2026
* *
* *
* *
* *
*
* *
* *
* *
* *
Main diagonal and anti-diagonal stars. Condition: i==j OR i+j==n-1
...

Zig-zag Pattern

Medium
4 views 25 Jan 2026
* *
* *
* *
* *
*
* *
* *
* *
* *
Diagonal lines alternate directions. Row-column relationship formula....

Hourglass Pattern

Medium
4 views 25 Jan 2026
*********
*******
*****
***
*
***
*****
*******
*********
Inverted triangle, then normal triangle. Coordination of spaces and stars...

Spiral Number Pattern

Medium
6 views 25 Jan 2026
1 2 3 4
12 13 14 5
11 16 15 6
10 9 8 7

Fill the numbers in the matrix in spiral order. Change direction at the boundaries....

Alphabet Diamond

Medium
5 views 25 Jan 2026
A
ABA
ABCBA
ABCDCBA
ABCDEDCBA
ABCDCBA
ABCBA
ABA
A
Characters increment then decrement. Combine upper and lower pyramid....

Butterfly Pattern

Easy
5 views 25 Jan 2026
* *
** **
*** ***
********
*** ***
** **
* * Logic: Upper half and lower half symmetric. Carefully calculate the pattern of stars and spaces....

Floyd's Triangle

Easy
7 views 25 Jan 2026
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15 Consecutive numbers. Maintain the counter and continuously increase it....

Pascal's Triangle

Easy
7 views 25 Jan 2026
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1 Binomial coefficients. Calculate from previous row to next row: C[i][j] = C[i-1][j-1] + C[i-1][j]...

Number Pyramid

Easy
5 views 24 Jan 2026
1
121
12321
1234321
123454321 Logic: Spaces, increasing numbers, then decreasing. Symmetry should be maintained....

Hollow Diamond:

Easy
9 views 24 Jan 2026
*
* *
* *
* *
* *
* *
*
Stars only on the boundaries, spaces in between. Combine the upper and lower triangles....