<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ANKIT DABRAL</title>
    <description>The latest articles on DEV Community by ANKIT DABRAL (@ankit250505).</description>
    <link>https://dev.to/ankit250505</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4222609%2F77d1ad09-5761-4ad5-b980-a3e551d3505f.jpg</url>
      <title>DEV Community: ANKIT DABRAL</title>
      <link>https://dev.to/ankit250505</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ankit250505"/>
    <language>en</language>
    <item>
      <title>From Fibonacci to Number Systems: My C++ Progress Today</title>
      <dc:creator>ANKIT DABRAL</dc:creator>
      <pubDate>Thu, 05 Nov 2026 17:06:37 +0000</pubDate>
      <link>https://dev.to/ankit250505/from-fibonacci-to-number-systems-my-c-progress-today-31ch</link>
      <guid>https://dev.to/ankit250505/from-fibonacci-to-number-systems-my-c-progress-today-31ch</guid>
      <description>&lt;p&gt;Today I wrapped up my last pending functions exercise: printing the Fibonacci series for N terms.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh8w67scz7ojbkawvleld.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh8w67scz7ojbkawvleld.png" alt="Cursor IDE Code for Fibonacci" width="800" height="782"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I followed a tutorial to understand the approach, then wrote the code on my own. That gave me a chance to practise using a function to organize a problem and to work through how the sequence grows from its previous two terms.&lt;/p&gt;

&lt;p&gt;After that, I started exploring number systems in code:&lt;/p&gt;

&lt;p&gt;Converting a decimal number to binary&lt;/p&gt;

&lt;p&gt;Converting a binary number back to decimal&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwdgqxo9xgfhgc8ogz4rz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwdgqxo9xgfhgc8ogz4rz.png" alt="Cursor IDE Code for Binary and Decimal Number Conversions" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Working through both directions helped me connect the number system concepts I was studying with actual C++ logic.&lt;/p&gt;

&lt;p&gt;I also started learning about arrays, which is the next step in my DSA journey. I’m looking forward to practising how to store and work with multiple values.&lt;/p&gt;

&lt;p&gt;One step at a time: understand the idea, translate it into code, and keep practising.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;#cpp #dsa #programming #learninginpublic&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>cpp</category>
      <category>learning</category>
      <category>programming</category>
    </item>
    <item>
      <title>My First Practice with Functions in C++</title>
      <dc:creator>ANKIT DABRAL</dc:creator>
      <pubDate>Wed, 04 Nov 2026 17:12:42 +0000</pubDate>
      <link>https://dev.to/ankit250505/my-first-practice-with-functions-in-c-2ea1</link>
      <guid>https://dev.to/ankit250505/my-first-practice-with-functions-in-c-2ea1</guid>
      <description>&lt;p&gt;Today I learned about functions in C++ and practiced using them to break problems into smaller, reusable pieces.&lt;/p&gt;

&lt;p&gt;I worked through four exercises:&lt;/p&gt;

&lt;p&gt;Sum of digits: Wrote a function that takes a number and returns the sum of its digits.&lt;/p&gt;

&lt;p&gt;Calculate nCr: Used a factorial helper function to calculate the binomial coefficient.&lt;/p&gt;

&lt;p&gt;Check for a prime: Created a function to check whether a number is prime.&lt;/p&gt;

&lt;p&gt;Print primes up to N: Used a function to find and print all prime numbers in a range.&lt;/p&gt;

&lt;p&gt;These exercises helped me practice passing values into functions, returning results, and calling helper functions from other functions. I’m also learning how separating a task from main() can make a program easier to follow.&lt;/p&gt;

&lt;p&gt;One idea I’m taking forward: functions help organize a solution into clear steps. I’ll keep practicing and improve these solutions as I learn more.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>cpp</category>
      <category>learning</category>
      <category>programming</category>
    </item>
    <item>
      <title>25 Pattern Problems Later: What I Learned About Loops in C++</title>
      <dc:creator>ANKIT DABRAL</dc:creator>
      <pubDate>Tue, 03 Nov 2026 17:28:28 +0000</pubDate>
      <link>https://dev.to/ankit250505/25-pattern-problems-later-what-i-learned-about-loops-in-c-47j1</link>
      <guid>https://dev.to/ankit250505/25-pattern-problems-later-what-i-learned-about-loops-in-c-47j1</guid>
      <description>&lt;p&gt;I’ve completed all 25 pattern problems in my C++ logic-building practice.&lt;/p&gt;

&lt;p&gt;At first, these exercises looked like simple output problems. But as the patterns grew more complex, I had to think carefully about rows, columns, spaces, counters, and how values change from one iteration to the next.&lt;/p&gt;

&lt;p&gt;Here are some of the ideas that clicked for me along the way.&lt;/p&gt;

&lt;p&gt;Start by understanding each row&lt;/p&gt;

&lt;p&gt;For most patterns, I can break a row into a few questions:&lt;/p&gt;

&lt;p&gt;How many spaces come first?&lt;/p&gt;

&lt;p&gt;How many characters should I print?&lt;/p&gt;

&lt;p&gt;Does the value change across a row, or carry over to the next one?&lt;/p&gt;

&lt;p&gt;The outer loop controls the rows. The inner loops print the contents of each row.&lt;/p&gt;

&lt;p&gt;For example, an increasing number triangle can use the row number to decide how many values to print:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;endl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once I could describe the row in terms of i, choosing the loop bounds became much easier.&lt;/p&gt;

&lt;p&gt;Spaces are part of the pattern&lt;/p&gt;

&lt;p&gt;Right-aligned triangles and pyramids helped me understand that spaces are output too. A row may have one loop for leading spaces and another for the visible characters.&lt;/p&gt;

&lt;p&gt;Thinking of a row in phases made alignment easier to reason about:&lt;/p&gt;

&lt;p&gt;Print leading spaces.&lt;/p&gt;

&lt;p&gt;Print the left or growing section.&lt;/p&gt;

&lt;p&gt;Print any remaining characters.&lt;/p&gt;

&lt;p&gt;Move to the next line.&lt;/p&gt;

&lt;p&gt;Counters have to change at the right time&lt;/p&gt;

&lt;p&gt;In continuous number patterns, the counter needs to continue across rows. When the pattern wraps after 9, the order of operations matters: print the current value, increment it, then wrap it back into the range.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;" "&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="o"&gt;%=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This helped me see how a small state variable can control a pattern across multiple rows.&lt;/p&gt;

&lt;p&gt;Characters follow the same loop logic&lt;/p&gt;

&lt;p&gt;Alphabet patterns use the same ideas as number patterns. Incrementing a char moves to the next letter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;ch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'A'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;ch&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;ch&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also learned to pay attention to where a character variable is initialized. If every row should restart from A, initialize it inside the outer loop. If the sequence should continue across rows, keep it outside.&lt;/p&gt;

&lt;p&gt;Build mirrored patterns in two parts&lt;/p&gt;

&lt;p&gt;For a number pyramid such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1
121
12321
1234321

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I can split each row into an increasing half and a decreasing half. The second half starts one number below the peak so the middle value is not printed twice.&lt;/p&gt;

&lt;p&gt;That same “split the row into phases” approach made other pyramids easier to work through.&lt;/p&gt;

&lt;p&gt;What I’m taking from the 25 problems&lt;/p&gt;

&lt;p&gt;The biggest lesson was to derive the pattern before trying to write all the loops. I now look for the relationship between the row number and the number of spaces or characters, and I check whether a counter should reset or continue.&lt;/p&gt;

&lt;p&gt;I also got more comfortable tracing loop values by hand. When output looked wrong, writing down the value of i, j, and the counter for one row often showed where the logic needed to change.&lt;/p&gt;

&lt;p&gt;Completing these 25 problems gave me a stronger foundation in nested loops and basic pattern logic. Next, I’m moving on to more DSA practice and will keep using the same habit: break the problem into smaller steps, trace them, then code.&lt;/p&gt;

&lt;p&gt;Updated Repo - &lt;a href="https://github.com/ankit250505/DSA-Journey.git" rel="noopener noreferrer"&gt;Repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;#cpp #dsa #beginners #programming&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>cpp</category>
      <category>learning</category>
      <category>programming</category>
    </item>
    <item>
      <title>Starting My DSA Journey with C++ — Learning One Problem at a Time 🚀</title>
      <dc:creator>ANKIT DABRAL</dc:creator>
      <pubDate>Mon, 02 Nov 2026 14:55:50 +0000</pubDate>
      <link>https://dev.to/ankit250505/starting-my-dsa-journey-with-c-learning-one-problem-at-a-time-28bo</link>
      <guid>https://dev.to/ankit250505/starting-my-dsa-journey-with-c-learning-one-problem-at-a-time-28bo</guid>
      <description>&lt;p&gt;I've decided to take my Data Structures and Algorithms (DSA) preparation more seriously and, instead of just solving problems privately, I want to start documenting my learning journey here.&lt;/p&gt;

&lt;p&gt;I'm currently practising DSA using C++, with a simple goal: build strong problem-solving skills, understand the logic behind solutions, and become better at writing efficient code.&lt;/p&gt;

&lt;p&gt;Why I started this journey&lt;/p&gt;

&lt;p&gt;One thing I've realised is that knowing programming syntax and actually solving problems are two different things.&lt;/p&gt;

&lt;p&gt;You might know loops, conditions, arrays, and functions, but applying them to solve a problem requires a different level of understanding.&lt;/p&gt;

&lt;p&gt;That's what I want to improve through consistent practice.&lt;/p&gt;

&lt;p&gt;What I'm currently working on&lt;/p&gt;

&lt;p&gt;I'm starting with basic logic-building problems, particularly star patterns.&lt;/p&gt;

&lt;p&gt;At first, these problems might look simple, but they are a great way to understand nested loops and how program execution works.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;For example, consider this pattern:

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

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While solving it, I explored how the outer loop controls the rows and the inner loop controls the number of stars printed in each row.&lt;/p&gt;

&lt;p&gt;One interesting thing I learned was how the expression 2 * i - 1 can generate an increasing odd number of stars without manually specifying the count for every row.&lt;/p&gt;

&lt;p&gt;It's a small concept, but understanding the mathematics behind the logic makes a difference.&lt;/p&gt;

&lt;p&gt;How I plan to document my progress&lt;/p&gt;

&lt;p&gt;I'm planning to follow a consistent approach:&lt;/p&gt;

&lt;p&gt;Practice problems regularly.&lt;/p&gt;

&lt;p&gt;Understand the logic before looking at solutions.&lt;/p&gt;

&lt;p&gt;Maintain notes about concepts and mistakes.&lt;/p&gt;

&lt;p&gt;Complete problems in batches of five.&lt;/p&gt;

&lt;p&gt;Push my solutions and progress updates to GitHub.&lt;/p&gt;

&lt;p&gt;I'll also share what I learn, the problems I find challenging, and the concepts that become clearer along the way.&lt;/p&gt;

&lt;p&gt;My goal&lt;/p&gt;

&lt;p&gt;I don't want this to become just another repository filled with solutions. I want it to reflect my actual learning process — including the mistakes, confusion, improvements, and progress.&lt;/p&gt;

&lt;p&gt;I know consistency matters more than speed, so I'm taking it one problem at a time.&lt;/p&gt;

&lt;p&gt;This is Day 1 of documenting my DSA journey. Let's see how far consistent effort can take me!&lt;/p&gt;

&lt;p&gt;GitHub Repository- &lt;a href="https://github.com/ankit250505" rel="noopener noreferrer"&gt;link for repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;#CPP #LearningInPublic #100DaysOfCode #DeveloperJourney&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>cpp</category>
      <category>devjournal</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
