9 views
25 Jan 2026
* * *
* * * *
* *
* * * *
* * *
Sine wave simulation. Condition based on rows and columns: (i+j)%4 == 0 and (i+j)%4 == 2...
4 views
25 Jan 2026
* * * * *
* * * *
* * *
* *
*
* *
* * *
* * * *
* * * * *
Inverted triangle above, normal below. Mirror image vertically....
5 views
25 Jan 2026
*** ***
***** *****
***********
*********
*******
*****
***
*
Mathematical pattern - calculate specific coordinates where stars are printed....
5 views
25 Jan 2026
* * * * * *
* * * * * *
* * * * * * * *
* * *
* * *
* * * * * * * *
* * * * * *
* * * * * *
Complex pattern - middle row, middle column, and corners. By combining multi...
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...
2 views
25 Jan 2026
* *
* *
* *
* *
*
* *
* *
* *
* *
Main diagonal and anti-diagonal stars. Condition: i==j OR i+j==n-1
...
4 views
25 Jan 2026
* *
* *
* *
* *
*
* *
* *
* *
* *
Diagonal lines alternate directions. Row-column relationship formula....
4 views
25 Jan 2026
*********
*******
*****
***
*
***
*****
*******
*********
Inverted triangle, then normal triangle. Coordination of spaces and stars...
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....
5 views
25 Jan 2026
A
ABA
ABCBA
ABCDCBA
ABCDEDCBA
ABCDCBA
ABCBA
ABA
A
Characters increment then decrement. Combine upper and lower pyramid....
5 views
25 Jan 2026
* *
** **
*** ***
********
*** ***
** **
* * Logic: Upper half and lower half symmetric. Carefully calculate the pattern of stars and spaces....
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....
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]...
5 views
24 Jan 2026
1
121
12321
1234321
123454321 Logic: Spaces, increasing numbers, then decreasing. Symmetry should be maintained....
9 views
24 Jan 2026
*
* *
* *
* *
* *
* *
*
Stars only on the boundaries, spaces in between. Combine the upper and lower triangles....