Why 90% of students fail star patterns (and how to never fail again)?

14 Jan 2026 · 19 min
19:21

In this Hindi tutorial, Akansha Yadav explains why most students struggle with star‑pattern coding questions and presents a step‑by‑step mental framework to solve any star‑pattern problem effortlessly. She begins by describing three consequences of failing star patterns: boredom with coding, difficulty with data structures & algorithms, and interview failures. She then identifies the core reason for confusion – learners are shown a pattern and a loop but never taught how to think about the pattern itself. Akansha introduces a visual‑grid approach: treat the pattern as a matrix of rows and columns, first count total rows, then total columns, and finally discover the rule that maps a row number to the number of stars in that row. She demonstrates this analysis on a sample pattern, deriving the condition “if row ≤ 3 then stars = row, else stars = 6 – row”. Using this rule she builds the actual code with nested for‑loops (outer loop for rows, inner loop for columns) and conditional statements (if/else) to print stars or spaces. Throughout she stresses the importance of writing pseudo‑code, performing a dry‑run line‑by‑line, and visualising the pattern before coding. The video ends with a call to subscribe and a promise to teach how to decompose any pattern into rows and columns for rapid problem solving.

Chapters

More from Akansha

0:24
youtube.com

Understand any AI Paper in just 5 minutes.

2mo ago
1:27:23
youtube.com

#6 Supervised Machine Learning Full Course: NumPy Code From Scratch

2mo ago
1:35
youtube.com

3 hacks for high cardinality data #ai #coding

2mo ago
0:42
youtube.com

Latency Vs throughput for interview preparation

2mo ago
1:15
youtube.com

One Hot encoding — categorical to numerical

2mo ago
0:48
youtube.com

Replication and Sharding for your next interview

2mo ago
30:43
youtube.com

#5 Stop Writing Slow Code: Learn NumPy Broadcasting & Vectorization

2mo ago
1:00
youtube.com

How to get 20 LPA Job using Python?

2mo ago
2:15
youtube.com

Full roadmap for machine learning engineer role | tech stack for ML

2mo ago
1:25
youtube.com

Before you apply for jobs - Watch this | What is AI-AI Bias

2mo ago
2:15
youtube.com

Reward hacking in reinforcement learning | best plugin to track RH in RL

2mo ago
See all content