DSA-topics · Patterns
Pattern Catalogue
Interactive star, number and alphabet pattern programs in Python, C, C++ and Java — triangles, pyramids, diamonds, spirals, waves, arrows and more. Open any pattern to switch the symbol, number or alphabet rubric, pick a style, resize it, and watch the Python, C, C++ or Java code execute line by line behind the scenes.
52 families × 5 kinds × 4 styles = 1040 patterns
*
**
***
****
*
**
***
****
****
***
**
*
****
***
**
*
*
***
*****
*******
*******
*****
***
*
*
***
*****
*******
*****
***
*
*
**
***
****
***
**
*
*
**
***
****
***
**
*
****
***
**
*
**
***
****
*
**
***
****
* *
** **
*** ***
********
********
*** ***
** **
* *
****
****
****
****
****
****
****
****
*
***
*****
*******
****
****
****
****
****
****
****
****
****
****
****
****
*
**
***
****
*
**
***
****
*
**
***
****
*
**
***
****
*
**
***
****
*
**
***
****
*
**
***
****
*
**
***
****
*****
*****
*****
*****
*****
*****
*****
*****
*****
*****
*****
*****
*****
*****
*****
*****
*****
*****
*****
*****
*
***
*****
*******
*******
*****
***
*
*
***
*****
*******
*****
***
*
*****
*****
*****
*****
****
****
****
****
*
**
***
****
*
**
***
****
****
****
****
****
****
****
****
****
*
*
****
*
* *
**
**
* *
* *
**
**
* *
* *
**
**
* *
****
*
*
****
* *
** *
* **
* *
*
***
*****
*******
*
*
*
*
*
*
*******
*****
***
*
*
**
***
****
***
**
*
*
**
***
****
***
**
*
*
***
*****
*******
*******
*******
*****
***
*
*
*
**
**
***
***
****
****
Recommended resourcesAffiliate links · may earn us a commission
Recommended for learners
Classic DSA interview booksThe reference books interviewers themselves learned from — great next to the visualizers.See the books Structured coding coursesVideo courses that pair well with visual practice — pick one language and go deep.Browse courses Cloud hosting for side projectsShip the portfolio project that gets you hired — free credits for new accounts.Claim credits
Go beyond the shapes
Patterns train your loop muscles — now put them to work on real data structures and algorithms.