Problem 1: Print a Right-Angle Triangle of Stars

Difficulty: Easy
Topics: Pattern Printing
Hint: Print a right-angle triangle pattern of stars (*). Each row should contain an increasing number of stars, starting from 1 star in the first row.

Example 1: Input: n = 4
Output:

* ** *** ****

Problem 2: Print a Square of Stars

Difficulty: Easy
Topics: Pattern Printing
Hint: Print a square pattern of stars (*). Each row and column should have the same number of stars.

Example 1: Input: n = 5
Output:

***** ***** ***** ***** *****

Problem 3: Print a Pyramid Pattern

Difficulty: Easy
Topics: Pattern Printing
Hint: Print a pyramid pattern with stars (*). The pyramid should have a single peak and each row should have an increasing number of stars, centered horizontally.

Example 1: Input: n = 3
Output:

* *** *****

Problem 4: Print a Diamond Pattern

Difficulty: Easy
Topics: Pattern Printing
Hint: Print a diamond pattern with stars (*). The pattern should include a single peak in the middle with symmetric rows above and below it.

Example 1: Input: n = 3
Output:

* *** ***** *** *

Problem 5: Print a Hollow Square of Stars

Difficulty: Easy
Topics: Pattern Printing
Hint: Print a hollow square pattern with stars (*). The border of the square should be filled with stars while the inner part should be empty.

Example 1: Input: n = 5
Output:

***** * * * * * * *****

Problem 6: Print a Number Triangle

Difficulty: Easy
Topics: Pattern Printing
Hint: Print a right-angle triangle pattern with numbers. Each row should contain an increasing sequence of numbers starting from 1.

Example 1: Input: n = 4
Output:

1 12 123 1234

Problem 7: Print an Inverted Triangle Pattern

Difficulty: Easy
Topics: Pattern Printing
Hint: Print an inverted triangle pattern with stars (*). Each row should contain decreasing numbers of stars from the top row.

Example 1: Input: n = 5
Output:

***** **** *** ** *

Problem 8: Print a Diamond Pattern with Numbers

Difficulty: Easy
Topics: Pattern Printing
Hint: Print a diamond pattern with numbers. The pattern should have a peak in the middle with symmetric rows above and below it.

Example 1: Input: n = 3
Output:

1 121 12321 121 1

Problem 9: Print a Right-Angle Triangle of Numbers

Difficulty: Easy
Topics: Pattern Printing
Hint: Print a right-angle triangle pattern with increasing numbers. Each row should contain a continuous sequence of increasing numbers.

Example 1: Input: n = 4
Output:

1 23 456 78910

Problem 10: Print a Pyramid Pattern with Numbers

Difficulty: Easy
Topics: Pattern Printing
Hint: Print a pyramid pattern with increasing numbers. Each row should have an increasing sequence of numbers, centered horizontally.

Example 1: Input: n = 3
Output:

1 232 34543

Problem 11: Print a Pattern of Alternating 0s and 1s

Difficulty: Medium
Topics: Matrix Pattern
Hint: Print a matrix where elements alternate between 0 and 1. The pattern should alternate both row-wise and column-wise.

Example 1: Input: n = 4
Output:

0101 1010 0101 1010

Problem 12: Print a Pascal’s Triangle

Difficulty: Medium
Topics: Matrix Pattern
Hint: Print Pascal’s Triangle up to N rows. Each row should be constructed based on the sum of the elements directly above it in the previous row.

Example 1: Input: n = 4
Output:

1 1 1 1 2 1 1 3 3 1

Problem 13: Print a Pattern of Consecutive Numbers

Difficulty: Medium
Topics: Matrix Pattern
Hint: Print a matrix of consecutive numbers starting from 1, filling rows sequentially.

Example 1: Input: n = 3
Output:

1 2 3 4 5 6 7 8 9

Problem 14: Print a Star Pattern with Increasing Width

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a pattern where each row has an increasing width of stars.

Example 1: Input: n = 3
Output:

* *** *****

Problem 15: Print a Right-Angle Triangle Pattern with Characters

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a right-angle triangle pattern using characters. Each row should contain the same character repeated according to the row number.

Example 1: Input: n = 3
Output:

A BB CCC

Problem 16: Print a Checkerboard Pattern

Difficulty: Medium
Topics: Matrix Pattern
Hint: Print a checkerboard pattern with two different characters alternating.

Example 1: Input: n = 4
Output:

XOXOXO OXOXOX XOXOXO OXOXOX

Problem 17: Print a Pyramid Pattern of Increasing Stars

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a pyramid pattern where each row increases in the number of stars.

Example 1: Input: n = 3
Output:

* *** *****

Problem 18: Print a Border Pattern with Numbers

Difficulty: Medium
Topics: Matrix Pattern
Hint: Print a border pattern using numbers. The border should be filled with numbers, and the inner part should be empty.

Example 1: Input: n = 4
Output:

1234 1 1 1 1 1234

Problem 19: Print an Inverted Pyramid Pattern with Characters

Difficulty: Medium
Topics: Pattern Printing
Hint: Print an inverted pyramid pattern using characters. Each row should have decreasing characters from the top row.

Example 1: Input: n = 3
Output:

CCC BB A

Problem 20: Print a Cross Pattern with Stars

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a cross pattern using stars. The cross should be centered within a matrix.

Example 1: Input: n = 5
Output:

*** * * * ***

Problem 21: Print a Spiral Matrix

Difficulty: Hard
Topics: Matrix Pattern
Hint: Print a matrix filled with numbers in a spiral pattern. The numbers should start from 1 and increment as you move around the spiral.

Example 1: Input: n = 3
Output:

1 2 3 8 9 4 7 6 5

Problem 22: Print a Diamond Pattern with Increasing Width

Difficulty: Hard
Topics: Pattern Printing
Hint: Print a diamond pattern where each line has increasing width of stars.

Example 1: Input: n = 3
Output:

* *** ***** *** *

Problem 23: Print a Diamond Pattern with Numbers Increasing

Difficulty: Hard
Topics: Pattern Printing
Hint: Print a diamond pattern where numbers increase. Each row should show a symmetrical pattern with numbers increasing towards the center.

Example 1: Input: n = 3
Output:

1 121 12321 121 1

Problem 24: Print a Pattern of Increasing and Decreasing Stars

Difficulty: Hard
Topics: Pattern Printing
Hint: Print a pattern where stars increase to a midpoint and then decrease.

Example 1: Input: n = 3
Output:

* *** ***** *** *

Problem 25: Print a Matrix with Zigzag Pattern

Difficulty: Hard
Topics: Matrix Pattern
Hint: Print a matrix with a zigzag pattern of numbers. The numbers should alternate direction row-wise.

Example 1: Input: n = 3
Output:

1 2 3 4 8 7 6 5 9 10 11 12

Problem 26: Print a Pattern of Alternating Characters in Rows

Difficulty: Hard
Topics: Pattern Printing
Hint: Print a pattern where rows alternate between two characters.

Example 1: Input: n = 4
Output:

ABAB BABA ABAB BABA

Problem 27: Print a Number Pyramid Pattern with Characters

Difficulty: Hard
Topics: Pattern Printing
Hint: Print a pyramid pattern using increasing characters, where each row increases in width and character range.

Example 1: Input: n = 3
Output:

A BCD EFGHI

Problem 28: Print a Pattern with Diagonal Lines

Difficulty: Hard
Topics: Pattern Printing
Hint: Print a pattern with diagonal lines using characters. Each diagonal line should be aligned properly.

Example 1: Input: n = 4
Output:

A B B C C D D

Problem 29: Print a Matrix with Diamond Pattern of Numbers

Difficulty: Hard
Topics: Matrix Pattern
Hint: Print a matrix where elements follow a diamond pattern with numbers.

Example 1: Input: n = 3
Output:

1 121 12321 121 1

Problem 30: Print a Cross Pattern of Stars with Diagonals

Difficulty: Hard
Topics: Pattern Printing
Hint: Print a cross pattern using stars with intersecting diagonals.

Example 1: Input: n = 5
Output:

* * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Problem 31: Print a Triangular Matrix with Numbers

Difficulty: Easy
Topics: Pattern Printing
Hint: Print a triangular matrix where each row contains increasing numbers. Each subsequent row should start from the next number.

Example 1: Input: n = 3
Output:

1 2 3 4 5 6

Problem 32: Print a Star Pattern with Increasing and Decreasing Width

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a pattern with stars that increase to a midpoint and then decrease. The stars should be centered horizontally.

Example 1: Input: n = 3
Output:

* *** ***** *** *

Problem 33: Print a Pattern of Nested Squares

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a pattern with nested squares using stars. The outermost square should be filled with stars, and each subsequent square should be smaller and centered inside the previous one.

Example 1: Input: n = 5
Output:

***** * * * * * * *****

Problem 34: Print a Pattern with Increasing Characters in Columns

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a pattern where each column contains increasing characters from A.

Example 1: Input: n = 3
Output:

A B C D E F

Problem 35: Print a Matrix with Spiral Diagonals

Difficulty: Hard
Topics: Matrix Pattern
Hint: Print a matrix with numbers arranged in diagonal spirals. The numbers should fill the matrix in a diagonal spiral fashion.

Example 1: Input: n = 3
Output:

1 2 3 4 5 6 7 8 9

Problem 36: Print a Checkerboard Pattern with Increasing Size

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a checkerboard pattern where the size of each square increases as you move along the matrix.

Example 1: Input: n = 3
Output:

XOX OXO XOX

Problem 37: Print a Cross Pattern with Increasing Size

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a cross pattern where the size of the cross increases with each row. The pattern should be centered.

Example 1: Input: n = 3
Output:

* *** ***** *** *

Problem 38: Print a Pattern of Alternating Triangles

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a pattern with alternating triangles of stars. The triangles should alternate direction.

Example 1: Input: n = 3
Output:

* *** ***** *** *

Problem 39: Print a Matrix with Diamond Pattern of Numbers

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a matrix where numbers form a diamond pattern. The numbers should increase and decrease symmetrically around the center.

Example 1: Input: n = 3
Output:

1 121 12321 121 1

Problem 40: Print a Star Pattern with Increasing Width and Centered

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a pattern where the width of stars increases, and the stars are centered horizontally.

Example 1: Input: n = 3
Output:

* *** *****

Problem 41: Print a Pattern with Spiral and Zigzag

Difficulty: Hard
Topics: Matrix Pattern
Hint: Print a matrix with both spiral and zigzag patterns. The matrix should first fill in a spiral pattern and then in a zigzag fashion.

Example 1: Input: n = 3
Output:

1 2 3 6 5 4 7 8 9

Problem 42: Print a Pattern of Alternating Characters in Matrix

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a matrix where characters alternate in each cell to form a pattern.

Example 1: Input: n = 3
Output:

ABAB BABA ABAB

Problem 43: Print a Pattern with Nested Triangles

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a pattern with nested triangles of stars. Each triangle should be centered and decrease in size.

Example 1: Input: n = 3
Output:

* *** ***** *** *

Problem 44: Print a Matrix with Increasing Rows and Columns

Difficulty: Easy
Topics: Matrix Pattern
Hint: Print a matrix where each row and column contains increasing numbers.

Example 1: Input: n = 3
Output:

1 2 3 4 5 6 7 8 9

Problem 45: Print a Pattern with Rows of Increasing Characters

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a pattern where each row contains an increasing sequence of characters.

Example 1: Input: n = 3
Output:

A BC DEF

Problem 46: Print a Star Pattern with Diamond Shape and Numbers

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a pattern with a diamond shape of stars, with numbers inside the diamond.

Example 1: Input: n = 3
Output:

1 121 12321 121 1

Problem 47: Print a Matrix with Cross Pattern of Numbers

Difficulty: Hard
Topics: Matrix Pattern
Hint: Print a matrix where the center forms a cross pattern with numbers.

Example 1: Input: n = 5
Output:

12321 01210 01210 01210 12321

Problem 48: Print a Pattern with Concentric Squares

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a pattern with concentric squares using stars. The outer square should be larger and each subsequent square should be centered inside.

Example 1: Input: n = 5
Output:

***** * * * * * * *****

Problem 49: Print a Pattern of Alternating Rows and Columns of Numbers

Difficulty: Easy
Topics: Pattern Printing
Hint: Print a pattern with alternating rows and columns of numbers, where each row and column increases sequentially.

Example 1: Input: n = 3
Output:

123 456 789

Problem 50: Print a Matrix with Zigzag Pattern of Stars

Difficulty: Medium
Topics: Pattern Printing
Hint: Print a matrix where stars form a zigzag pattern, alternating rows in their positioning.

Example 1: Input: n = 3
Output:

* * * * * * * *