Hollow Square Pattern Problem

Hollow Square Pattern Problem — ExecCode Easy DSA Practice

Solve the Hollow Square Pattern problem on ExecCode. Free online easy DSA practice in Patterns & Nested Loops. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Description You are given the input needed to solve Hollow Square Pattern. Your task is to compute the required answer and return pattern rows separated by newlines. n: side length.

Examples

Input {"n": 1}; Output . Input {"n": 3}; Output * . Input {"n": 4}; Output

Constraints

1 <= n <= 20

Practice Hollow Square Pattern free on ExecCode. Browse DSA problems, topic map, and placement guides.