Dsa
Recursion
Warm-up
Fractal Symmetry
A fractal sequence for a number N is defined as follows: the number N, followed by the fractal sequence for N-1, followed by the number N. The sequence for N=1 is simply '1'.
Input: A single integer N (1 <= N <= 9).
Output: The resulting fractal string.
Example:
Input: 3
Output: 32123
Key concepts
recursionstring-buildingmath
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now