<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[My Journey Learning HTML: From Zero to Building My First Portfolio]]></title><description><![CDATA[My Journey Learning HTML: From Zero to Building My First Portfolio]]></description><link>https://html-portfolio.hashnode.dev</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1593680282896/kNC7E8IR4.png</url><title>My Journey Learning HTML: From Zero to Building My First Portfolio</title><link>https://html-portfolio.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Fri, 18 Sep 2026 02:10:30 GMT</lastBuildDate><atom:link href="https://html-portfolio.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Sliding Window Pattern in DSA: A Beginner-Friendly Guide]]></title><description><![CDATA[When I first started solving array and string problems, Sliding Window was one of the patterns that felt confusing.
The code itself is usually short, but understanding when to move the window, what to]]></description><link>https://html-portfolio.hashnode.dev/sliding-window-pattern-in-dsa-a-beginner-friendly-guide</link><guid isPermaLink="true">https://html-portfolio.hashnode.dev/sliding-window-pattern-in-dsa-a-beginner-friendly-guide</guid><category><![CDATA[DSA]]></category><category><![CDATA[data structures]]></category><category><![CDATA[sliding window]]></category><category><![CDATA[leetcode]]></category><category><![CDATA[Python]]></category><category><![CDATA[Programming Blogs]]></category><dc:creator><![CDATA[Annet]]></dc:creator><pubDate>Sun, 13 Sep 2026 15:11:54 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/1dd52f8e-a53d-43fc-8663-8ff6a7999e30.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When I first started solving array and string problems, <strong>Sliding Window</strong> was one of the patterns that felt confusing.</p>
<p>The code itself is usually short, but understanding <strong>when to move the window, what to remove, and what to add</strong> can be difficult at first.</p>
<p>This blog explains the Sliding Window technique from the basics with a simple example.</p>
<hr />
<h2>What is Sliding Window?</h2>
<p>Sliding Window is a technique used to solve problems involving <strong>contiguous portions of an array or string</strong>.</p>
<p>Instead of repeatedly calculating the same elements, we maintain a window and move it through the input.</p>
<p>For example, consider:</p>
<pre><code class="language-python">nums = [1, 12, -5, -6, 50, 3]
</code></pre>
<p>If the window size is <code>4</code>, our windows are:</p>
<pre><code class="language-text">[1, 12, -5, -6]
[12, -5, -6, 50]
[-5, -6, 50, 3]
</code></pre>
<p>The window moves one position at a time.</p>
<p>That is why it is called <strong>Sliding Window</strong>.</p>
<hr />
<h1>Why Do We Need Sliding Window?</h1>
<p>Let's say we want to find the maximum sum of any <code>k</code> consecutive elements.</p>
<p>For:</p>
<pre><code class="language-python">nums = [1, 12, -5, -6, 50, 3]
k = 4
</code></pre>
<p>We could calculate every window from scratch:</p>
<pre><code class="language-text">1 + 12 + (-5) + (-6) = 2

12 + (-5) + (-6) + 50 = 51

(-5) + (-6) + 50 + 3 = 42
</code></pre>
<p>This works, but we are repeatedly calculating elements that were already included in the previous window.</p>
<p>Sliding Window avoids this unnecessary work.</p>
<hr />
<h1>The Main Idea</h1>
<p>Look at the first window:</p>
<pre><code class="language-text">[1, 12, -5, -6]  50  3
</code></pre>
<p>Its sum is:</p>
<pre><code class="language-text">2
</code></pre>
<p>Now we slide the window one position to the right:</p>
<pre><code class="language-text">1  [12, -5, -6, 50]  3
</code></pre>
<p>What changed?</p>
<ul>
<li><p><code>1</code> left the window.</p>
</li>
<li><p><code>50</code> entered the window.</p>
</li>
</ul>
<p>So instead of calculating the entire sum again:</p>
<pre><code class="language-text">new sum = old sum - element leaving + element entering
</code></pre>
<p>Therefore:</p>
<pre><code class="language-text">new sum = 2 - 1 + 50
        = 51
</code></pre>
<p>This simple idea is the heart of the <strong>fixed-size Sliding Window</strong> technique.</p>
<hr />
<h1>Fixed-Size Sliding Window</h1>
<p>The general pattern looks like this:</p>
<pre><code class="language-python">window = sum(nums[:k])

for i in range(k, len(nums)):
    window = window - nums[i-k] + nums[i]
</code></pre>
<p>The important line is:</p>
<pre><code class="language-python">window = window - nums[i-k] + nums[i]
</code></pre>
<p>It means:</p>
<pre><code class="language-text">Remove the element that is leaving
+
Add the element that is entering
</code></pre>
<hr />
<h1>Example: LeetCode 643</h1>
<p>One beginner-friendly problem for learning Sliding Window is:</p>
<p><strong>Maximum Average Subarray I</strong></p>
<p>Given an integer array <code>nums</code> and an integer <code>k</code>, find the contiguous subarray of length <code>k</code> that has the maximum average.</p>
<p>For example:</p>
<pre><code class="language-python">nums = [1, 12, -5, -6, 50, 3]
k = 4
</code></pre>
<p>The possible windows are:</p>
<pre><code class="language-text">[1, 12, -5, -6]       → sum = 2
[12, -5, -6, 50]      → sum = 51
[-5, -6, 50, 3]       → sum = 42
</code></pre>
<p>The maximum sum is:</p>
<pre><code class="language-text">51
</code></pre>
<p>Therefore, the maximum average is:</p>
<pre><code class="language-text">51 / 4 = 12.75
</code></pre>
<hr />
<h1>Python Solution</h1>
<pre><code class="language-python">class Solution:
    def findMaxAverage(self, nums: List[int], k: int) -&gt; float:
        tot = sum(nums[:k])

        avg = tot / k
        maximum = avg

        for i in range(k, len(nums)):
            tot = tot - nums[i-k] + nums[i]

            avg = tot / k
            maximum = max(maximum, avg)

        return maximum
</code></pre>
<p>Let's understand it step by step.</p>
<hr />
<h2>Step 1: Calculate the First Window</h2>
<pre><code class="language-python">tot = sum(nums[:k])
</code></pre>
<p>If:</p>
<pre><code class="language-python">nums = [1, 12, -5, -6, 50, 3]
k = 4
</code></pre>
<p>then:</p>
<pre><code class="language-python">nums[:k]
</code></pre>
<p>gives:</p>
<pre><code class="language-text">[1, 12, -5, -6]
</code></pre>
<p>So:</p>
<pre><code class="language-text">tot = 2
</code></pre>
<hr />
<h2>Step 2: Calculate the First Average</h2>
<pre><code class="language-python">avg = tot / k
</code></pre>
<p>Therefore:</p>
<pre><code class="language-text">avg = 2 / 4
    = 0.5
</code></pre>
<p>We store this as our current maximum:</p>
<pre><code class="language-python">maximum = avg
</code></pre>
<hr />
<h1>Step 3: Slide the Window</h1>
<p>Now we start from index <code>k</code>:</p>
<pre><code class="language-python">for i in range(k, len(nums)):
</code></pre>
<p>Since <code>k = 4</code>, the first value of <code>i</code> is <code>4</code>.</p>
<p>The new element is:</p>
<pre><code class="language-python">nums[i]
</code></pre>
<p>which is:</p>
<pre><code class="language-python">nums[4] = 50
</code></pre>
<p>The element leaving the window is:</p>
<pre><code class="language-python">nums[i-k]
</code></pre>
<p>Since:</p>
<pre><code class="language-text">i = 4
k = 4
</code></pre>
<p>we get:</p>
<pre><code class="language-text">i - k = 0
</code></pre>
<p>Therefore:</p>
<pre><code class="language-python">nums[i-k] = nums[0] = 1
</code></pre>
<p>So:</p>
<pre><code class="language-python">tot = tot - nums[i-k] + nums[i]
</code></pre>
<p>becomes:</p>
<pre><code class="language-text">tot = 2 - 1 + 50
    = 51
</code></pre>
<p>Our window has now moved from:</p>
<pre><code class="language-text">[1, 12, -5, -6]
</code></pre>
<p>to:</p>
<pre><code class="language-text">[12, -5, -6, 50]
</code></pre>
<hr />
<h1>Step 4: Update the Maximum</h1>
<p>We calculate:</p>
<pre><code class="language-python">avg = tot / k
</code></pre>
<p>Therefore:</p>
<pre><code class="language-text">avg = 51 / 4
    = 12.75
</code></pre>
<p>Then:</p>
<pre><code class="language-python">maximum = max(maximum, avg)
</code></pre>
<p>The maximum becomes:</p>
<pre><code class="language-text">12.75
</code></pre>
<p>The same process continues until we reach the end of the array.</p>
<hr />
<h1>The Pattern to Remember</h1>
<p>For a fixed-size Sliding Window, remember these three steps:</p>
<h3>1. Calculate the first window</h3>
<pre><code class="language-python">window = sum(nums[:k])
</code></pre>
<h3>2. Slide the window</h3>
<pre><code class="language-python">window = window - nums[i-k] + nums[i]
</code></pre>
<h3>3. Update the answer</h3>
<pre><code class="language-python">answer = max(answer, window)
</code></pre>
<p>That's the basic pattern.</p>
<hr />
<h1>Time Complexity</h1>
<p>A brute-force approach may repeatedly calculate the sum of every window.</p>
<p>Sliding Window allows us to update the sum in constant time for each movement.</p>
<p>Therefore:</p>
<pre><code class="language-text">Time Complexity: O(n)
Space Complexity: O(1)
</code></pre>
<p>where <code>n</code> is the number of elements in the array.</p>
<hr />
<h1>How to Recognize a Sliding Window Problem</h1>
<p>When reading a LeetCode problem, look for words such as:</p>
<ul>
<li><p>contiguous</p>
</li>
<li><p>consecutive</p>
</li>
<li><p>substring</p>
</li>
<li><p>subarray</p>
</li>
<li><p>window</p>
</li>
<li><p>exactly <code>k</code> elements</p>
</li>
<li><p>at most <code>k</code> elements</p>
</li>
<li><p>longest/shortest substring</p>
</li>
<li><p>maximum/minimum sum of consecutive elements</p>
</li>
</ul>
<p>For example:</p>
<blockquote>
<p>Find the maximum sum of <code>k</code> consecutive elements.</p>
</blockquote>
<p>This should immediately make you think:</p>
<p><strong>Fixed-size Sliding Window.</strong></p>
<hr />
<h1>Common Mistake</h1>
<p>One common mistake is recalculating the entire window every time.</p>
<p>For example:</p>
<pre><code class="language-python">for i in range(n-k+1):
    total = sum(nums[i:i+k])
</code></pre>
<p>This repeatedly calculates values that were already calculated.</p>
<p>Instead, calculate the first window once and then update it:</p>
<pre><code class="language-python">window = window - element_leaving + element_entering
</code></pre>
<hr />
<h1>Fixed vs Variable Sliding Window</h1>
<p>There are two major types of Sliding Window.</p>
<h3>Fixed-size window</h3>
<p>The window size stays the same.</p>
<p>Example:</p>
<pre><code class="language-text">k = 4

[1, 2, 3, 4]
   ↓
[2, 3, 4, 5]
   ↓
[3, 4, 5, 6]
</code></pre>
<p>Problems such as <strong>Maximum Average Subarray I</strong> use this pattern.</p>
<h3>Variable-size window</h3>
<p>The window size can grow and shrink depending on a condition.</p>
<p>For example:</p>
<pre><code class="language-text">[ a b c d e ]
  ←──────→
</code></pre>
<p>The window may expand when the condition is valid and shrink when the condition is violated.</p>
<p>Variable-size Sliding Window is slightly more difficult, so it is better to learn fixed-size windows first.</p>
<hr />
<h1>Practice Roadmap</h1>
<p>If you're new to Sliding Window, don't immediately jump into difficult problems.</p>
<p>A good progression is:</p>
<ol>
<li><p><strong>LeetCode 643 — Maximum Average Subarray I</strong></p>
</li>
<li><p><strong>LeetCode 1456 — Maximum Number of Vowels in a Substring of Given Length</strong></p>
</li>
<li><p><strong>LeetCode 1343 — Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold</strong></p>
</li>
<li><p><strong>LeetCode 1876 — Substrings of Size Three with Distinct Characters</strong></p>
</li>
<li><p><strong>LeetCode 209 — Minimum Size Subarray Sum</strong></p>
</li>
<li><p><strong>LeetCode 3 — Longest Substring Without Repeating Characters</strong></p>
</li>
<li><p><strong>LeetCode 1004 — Max Consecutive Ones III</strong></p>
</li>
<li><p><strong>LeetCode 424 — Longest Repeating Character Replacement</strong></p>
</li>
</ol>
<p>The first four help build the fixed-size pattern.</p>
<p>The later problems introduce <strong>variable-size windows</strong>, which require a deeper understanding of when to expand and shrink the window.</p>
<hr />
<h1>Final Takeaway</h1>
<p>Sliding Window is not a completely different way of thinking about arrays.</p>
<p>It is mainly about <strong>reusing information from the previous window instead of calculating everything again</strong>.</p>
<p>The most important idea is:</p>
<pre><code class="language-text">Remove what leaves.
Add what enters.
Move the window.
Update the answer.
</code></pre>
<p>Once this becomes familiar, many array and string problems that initially look complicated become much easier to recognize.</p>
<p><strong>Start small, understand the pattern, and then increase the difficulty.</strong></p>
]]></content:encoded></item><item><title><![CDATA[Mastering the Two Pointers Technique in Python (With Easy Examples)]]></title><description><![CDATA[When I first started solving coding problems, I noticed that many array and string questions looked different but could actually be solved using the same approach: Two Pointers.
Instead of using neste]]></description><link>https://html-portfolio.hashnode.dev/mastering-the-two-pointers-technique-in-python-with-easy-examples</link><guid isPermaLink="true">https://html-portfolio.hashnode.dev/mastering-the-two-pointers-technique-in-python-with-easy-examples</guid><category><![CDATA[Python]]></category><category><![CDATA[DSA]]></category><category><![CDATA[data structures]]></category><category><![CDATA[two pointers]]></category><category><![CDATA[coding]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[Problem Solving]]></category><category><![CDATA[algorithms]]></category><dc:creator><![CDATA[Annet]]></dc:creator><pubDate>Tue, 04 Aug 2026 15:12:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/9ffc77e3-3cd8-4c80-a1bc-0851d2910172.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When I first started solving coding problems, I noticed that many array and string questions looked different but could actually be solved using the same approach: <strong>Two Pointers</strong>.</p>
<p>Instead of using nested loops and checking every possible pair of elements, the two pointers technique allows us to solve many problems efficiently in <strong>O(n)</strong> time.</p>
<p>In this blog, I'll explain what the two pointers technique is, when to use it, and some common patterns with examples.</p>
<hr />
<h1>What is the Two Pointers Technique?</h1>
<p>The Two Pointers technique uses <strong>two indices (pointers)</strong> that move through a data structure such as an array or string.</p>
<p>Instead of processing one element at a time, we use two positions that move based on certain conditions until we reach the desired result.</p>
<p>This often reduces the time complexity from <strong>O(n²)</strong> to <strong>O(n)</strong>.</p>
<hr />
<h1>When Should You Use Two Pointers?</h1>
<p>The technique is useful when working with:</p>
<ul>
<li><p>Sorted arrays</p>
</li>
<li><p>Strings</p>
</li>
<li><p>Palindromes</p>
</li>
<li><p>Removing duplicates</p>
</li>
<li><p>Pair sum problems</p>
</li>
<li><p>Reversing arrays</p>
</li>
<li><p>Sliding window variations</p>
</li>
</ul>
<p>Whenever you see words like:</p>
<ul>
<li><p>pair</p>
</li>
<li><p>sorted</p>
</li>
<li><p>remove duplicates</p>
</li>
<li><p>reverse</p>
</li>
<li><p>palindrome</p>
</li>
</ul>
<p>think about whether the two pointers approach can simplify the solution.</p>
<hr />
<h1>Types of Two Pointer Patterns</h1>
<p>There are several common patterns.</p>
<h2>1. Opposite Direction Pointers</h2>
<p>One pointer starts from the beginning and the other starts from the end.</p>
<pre><code class="language-plaintext">left                  right
↓                       ↓

[1, 2, 3, 4, 5]
</code></pre>
<p>The pointers move toward each other.</p>
<h3>Common Problems</h3>
<ul>
<li><p>Valid Palindrome</p>
</li>
<li><p>Two Sum II</p>
</li>
<li><p>Reverse String</p>
</li>
<li><p>Container With Most Water</p>
</li>
</ul>
<p>Example:</p>
<pre><code class="language-python">s = list("hello")

left = 0
right = len(s) - 1

while left &lt; right:
    s[left], s[right] = s[right], s[left]
    left += 1
    right -= 1

print("".join(s))
</code></pre>
<p>Output</p>
<pre><code class="language-plaintext">olleh
</code></pre>
<p>Time Complexity:</p>
<pre><code class="language-plaintext">O(n)
</code></pre>
<p>Space Complexity:</p>
<pre><code class="language-plaintext">O(1)
</code></pre>
<hr />
<h2>2. Same Direction Pointers (Fast and Slow)</h2>
<p>Both pointers move from left to right.</p>
<p>The fast pointer explores every element while the slow pointer keeps track of the correct position.</p>
<pre><code class="language-plaintext">slow fast
 ↓    ↓

[1,1,2,2,3]
</code></pre>
<p>Common Problems</p>
<ul>
<li><p>Remove Duplicates from Sorted Array</p>
</li>
<li><p>Move Zeroes</p>
</li>
<li><p>Remove Element</p>
</li>
</ul>
<p>Example</p>
<pre><code class="language-python">nums = [1,1,2,2,3]

left = 0

for right in range(1, len(nums)):
    if nums[left] != nums[right]:
        left += 1
        nums[left] = nums[right]

print(nums[:left+1])
</code></pre>
<p>Output</p>
<pre><code class="language-plaintext">[1,2,3]
</code></pre>
<p>Time Complexity</p>
<pre><code class="language-plaintext">O(n)
</code></pre>
<p>Space Complexity</p>
<pre><code class="language-plaintext">O(1)
</code></pre>
<hr />
<h2>3. Slow and Fast Pointer</h2>
<p>This is another variation where one pointer moves slower than the other.</p>
<p>Usually,</p>
<pre><code class="language-plaintext">slow += 1
fast += 2
</code></pre>
<p>Common Problems</p>
<ul>
<li><p>Detect Cycle in Linked List</p>
</li>
<li><p>Find Middle of Linked List</p>
</li>
<li><p>Happy Number</p>
</li>
</ul>
<p>This pattern is mostly used with linked lists rather than arrays.</p>
<hr />
<h1>Example: Two Sum II</h1>
<p>Given a sorted array, find two numbers whose sum equals the target.</p>
<pre><code class="language-python">numbers = [2,7,11,15]
target = 9

left = 0
right = len(numbers)-1

while left &lt; right:
    current = numbers[left] + numbers[right]

    if current == target:
        print(left, right)
        break
    elif current &lt; target:
        left += 1
    else:
        right -= 1
</code></pre>
<p>Output</p>
<pre><code class="language-plaintext">0 1
</code></pre>
<p>Notice how we never use nested loops.</p>
<hr />
<h1>Advantages</h1>
<p>✅ Simple to understand</p>
<p>✅ Reduces time complexity</p>
<p>✅ Often converts O(n²) solutions into O(n)</p>
<p>✅ Uses constant extra space</p>
<hr />
<h1>Limitations</h1>
<ul>
<li><p>Works best with sorted data.</p>
</li>
<li><p>Doesn't apply to every array problem.</p>
</li>
<li><p>Choosing pointer movement correctly is important.</p>
</li>
</ul>
<hr />
<h1>Tips to Identify Two Pointer Problems</h1>
<p>Ask yourself these questions:</p>
<ul>
<li><p>Is the array sorted?</p>
</li>
<li><p>Am I searching for a pair?</p>
</li>
<li><p>Can I avoid nested loops?</p>
</li>
<li><p>Can I process elements from both ends?</p>
</li>
<li><p>Can one pointer track the answer while another explores?</p>
</li>
</ul>
<p>If the answer is yes, the Two Pointers technique is worth considering.</p>
<hr />
<h1>Final Thoughts</h1>
<p>The Two Pointers technique is one of the most important problem-solving patterns in Data Structures and Algorithms. Once you understand when and how to move the pointers, many coding interview problems become much easier.</p>
<p>I recently practiced this technique by solving problems like <strong>Remove Duplicates from Sorted Array</strong>, <strong>Merge Sorted Array</strong>, <strong>Valid Palindrome</strong>, and <strong>Two Sum II</strong>. Each problem helped me recognize different pointer movement patterns and improved my confidence in solving array and string problems efficiently.</p>
<p>Mastering this technique is a great step before learning more advanced patterns like <strong>Sliding Window</strong>, which builds upon similar ideas while handling subarrays and substrings.</p>
<p>Happy Coding! 🚀</p>
]]></content:encoded></item><item><title><![CDATA[ Mastering Sorting Algorithms in Python: My DSA Learning Journey]]></title><description><![CDATA[When I started learning Data Structures and Algorithms (DSA), one of the first major topics I came across was Sorting Algorithms. At first, I thought sorting was simply arranging numbers in ascending ]]></description><link>https://html-portfolio.hashnode.dev/mastering-sorting-algorithms-in-python-my-dsa-learning-journey</link><guid isPermaLink="true">https://html-portfolio.hashnode.dev/mastering-sorting-algorithms-in-python-my-dsa-learning-journey</guid><category><![CDATA[sorting algorithms]]></category><category><![CDATA[Python]]></category><category><![CDATA[DSA]]></category><category><![CDATA[bubble sort]]></category><category><![CDATA[selection sort]]></category><category><![CDATA[insertion sort]]></category><category><![CDATA[merge sort]]></category><category><![CDATA[Quick Sort]]></category><dc:creator><![CDATA[Annet]]></dc:creator><pubDate>Fri, 31 Jul 2026 17:27:22 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/5d160211-cca8-4121-b539-6f0b9a8252c7.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When I started learning <strong>Data Structures and Algorithms (DSA)</strong>, one of the first major topics I came across was <strong>Sorting Algorithms</strong>. At first, I thought sorting was simply arranging numbers in ascending or descending order. But as I explored further, I realized that there are multiple ways to sort the same data, and each algorithm follows a unique approach.</p>
<p>Sorting algorithms are fundamental because they improve the efficiency of many operations such as searching, data analysis, and organizing information. They also help build logical thinking and problem-solving skills, making them an essential topic for coding interviews and competitive programming.</p>
<p>In this blog, I'll share the five sorting algorithms I learned in Python:</p>
<ul>
<li><p>Bubble Sort</p>
</li>
<li><p>Selection Sort</p>
</li>
<li><p>Insertion Sort</p>
</li>
<li><p>Merge Sort</p>
</li>
<li><p>Quick Sort</p>
</li>
</ul>
<p>Along with a simple explanation, I'll also share the Python implementation I practiced.</p>
<hr />
<h1>📌 What is Sorting?</h1>
<p>Sorting is the process of arranging data in a specific order, usually <strong>ascending</strong> or <strong>descending</strong>.</p>
<p>For example,</p>
<pre><code class="language-text">Original Array:
[7, 2, 9, 1, 5]

Sorted Array:
[1, 2, 5, 7, 9]
</code></pre>
<p>Sorting is used in many real-world applications, such as:</p>
<ul>
<li><p>Displaying products by price</p>
</li>
<li><p>Ranking students by marks</p>
</li>
<li><p>Organizing files alphabetically</p>
</li>
<li><p>Searching for contacts on a phone</p>
</li>
<li><p>Processing large datasets efficiently</p>
</li>
</ul>
<hr />
<h1>🔵 Bubble Sort</h1>
<p>Bubble Sort is one of the simplest sorting algorithms to understand.</p>
<p>It repeatedly compares two adjacent elements. If they are in the wrong order, they are swapped. After each pass through the array, the largest unsorted element moves to the end, just like a bubble rising to the surface of water.</p>
<h3>Example</h3>
<pre><code class="language-text">Input:
[5, 3, 8, 4]

After Pass 1:
[3, 5, 4, 8]

After Pass 2:
[3, 4, 5, 8]

Output:
[3, 4, 5, 8]
</code></pre>
<h3>Python Implementation</h3>
<pre><code class="language-python">def bubbleSort(arr):
    n = len(arr)

    for i in range(n):
        swapped = False

        for j in range(0, n - i - 1):

            if arr[j] &gt; arr[j + 1]:
                arr[j], arr[j + 1] = arr[j + 1], arr[j]
                swapped = True

        if not swapped:
            break

arr = [64, 34, 25, 12, 22, 11, 90]

bubbleSort(arr)

print(arr)
</code></pre>
<h3>Output</h3>
<pre><code class="language-text">[11, 12, 22, 25, 34, 64, 90]
</code></pre>
<hr />
<h1>🟢 Selection Sort</h1>
<p>Selection Sort works by repeatedly finding the smallest element from the unsorted portion of the array and placing it in its correct position.</p>
<p>Instead of swapping many times like Bubble Sort, Selection Sort performs only one swap at the end of each pass.</p>
<h3>Example</h3>
<pre><code class="language-text">Input:
[29, 10, 14, 37, 13]

Pass 1:
[10, 29, 14, 37, 13]

Pass 2:
[10, 13, 14, 37, 29]

Output:
[10, 13, 14, 29, 37]
</code></pre>
<h3>Python Implementation</h3>
<pre><code class="language-python">def selection_sort(arr):
    n = len(arr)

    for i in range(n - 1):

        small = i

        for j in range(i + 1, n):

            if arr[j] &lt; arr[small]:
                small = j

        arr[i], arr[small] = arr[small], arr[i]

    return arr

arr = [-2, 45, 0, 11, -9, 88, -97, -202, 747]

print(selection_sort(arr))
</code></pre>
<h3>Output</h3>
<pre><code class="language-text">[-202, -97, -9, -2, 0, 11, 45, 88, 747]
</code></pre>
<hr />
<h1>🟡 Insertion Sort</h1>
<p>Insertion Sort works similarly to how we arrange playing cards in our hands.</p>
<p>It starts with the second element, compares it with the previous elements, and inserts it into the correct position. With every iteration, the sorted portion of the array grows larger.</p>
<h3>Example</h3>
<pre><code class="language-text">Input:
[7, 4, 5, 2]

Insert 4:
[4, 7, 5, 2]

Insert 5:
[4, 5, 7, 2]

Insert 2:
[2, 4, 5, 7]
</code></pre>
<h3>Python Implementation</h3>
<pre><code class="language-python">def insertion_sort(arr):

    n = len(arr)

    if n &lt;= 1:
        return

    for i in range(1, n):

        key = arr[i]

        j = i - 1

        while j &gt;= 0 and key &lt; arr[j]:

            arr[j + 1] = arr[j]

            j -= 1

        arr[j + 1] = key

arr = [12, 11, 13, 5, -1]

print(insertion_sort(arr))

print(arr)
</code></pre>
<h3>Output</h3>
<pre><code class="language-text">None
[-1, 5, 11, 12, 13]
</code></pre>
<p><strong>Note:</strong> The function sorts the array in place, so it doesn't return a new array. That's why <code>print(insertion_sort(arr))</code> prints <code>None</code>, while <code>print(arr)</code> displays the sorted array.</p>
<hr />
<h1>🟣 Merge Sort</h1>
<p>Merge Sort is based on the <strong>Divide and Conquer</strong> technique.</p>
<p>Instead of sorting the entire array at once, it repeatedly divides the array into smaller halves until each sub-array contains only one element. Then, it merges these smaller arrays back together in sorted order.</p>
<p>This approach makes Merge Sort one of the most efficient sorting algorithms for large datasets.</p>
<h3>Example</h3>
<pre><code class="language-text">Input:
[8, 3, 5, 4]

Divide

[8, 3]
[5, 4]

Divide Again

[8] [3]
[5] [4]

Merge

[3, 8]
[4, 5]

Final Output

[3, 4, 5, 8]
</code></pre>
<h3>Python Implementation</h3>
<pre><code class="language-python">def merge_sort(arr):

    if len(arr) &lt;= 1:
        return arr

    mid = len(arr) // 2

    left = merge_sort(arr[:mid])

    right = merge_sort(arr[mid:])

    return merge(left, right)


def merge(left, right):

    i = j = 0

    result = []

    while i &lt; len(left) and j &lt; len(right):

        if left[i] &lt;= right[j]:

            result.append(left[i])

            i += 1

        else:

            result.append(right[j])

            j += 1

    result.extend(left[i:])

    result.extend(right[j:])

    return result


nums = [8, 3, 5, 4, 7, 6, 1]

print(merge_sort(nums))
</code></pre>
<h3>Output</h3>
<pre><code class="language-text">[1, 3, 4, 5, 6, 7, 8]
</code></pre>
<hr />
<h1>🔴 Quick Sort</h1>
<p>Quick Sort is another Divide and Conquer algorithm.</p>
<p>Instead of splitting the array into equal halves, it selects one element called the <strong>pivot</strong>. All elements smaller than the pivot are placed on the left, while larger elements are placed on the right. The same process is then repeated recursively for both sides until the array is completely sorted.</p>
<p>Quick Sort is one of the fastest sorting algorithms used in practice.</p>
<h3>Example</h3>
<pre><code class="language-text">Input:
[8, 3, 1, 7, 0, 10, 2]

Choose Pivot = 2

Partition

[1, 0] 2 [8, 3, 7, 10]

Recursively sort both sides

Output

[0, 1, 2, 3, 7, 8, 10]
</code></pre>
<h3>Python Implementation</h3>
<pre><code class="language-python">def partition(arr, low, high):

    pivot = arr[high]

    i = low - 1

    for j in range(low, high):

        if arr[j] &lt;= pivot:

            i += 1

            arr[i], arr[j] = arr[j], arr[i]

    arr[i + 1], arr[high] = arr[high], arr[i + 1]

    return i + 1


def quick_sort(arr, low, high):

    if low &lt; high:

        p = partition(arr, low, high)

        quick_sort(arr, low, p - 1)

        quick_sort(arr, p + 1, high)


arr = [1, 7, 4, 1, 10, 9, -2]

quick_sort(arr, 0, len(arr) - 1)

print(arr)
</code></pre>
<h3>Output</h3>
<pre><code class="language-text">[-2, 1, 1, 4, 7, 9, 10]
</code></pre>
<hr />
<h1>🎯 What I Learned</h1>
<p>Learning sorting algorithms taught me that there are many ways to solve the same problem. Every algorithm follows a different strategy, and understanding those strategies helped me improve my logical thinking and problem-solving skills.</p>
<p>While Bubble, Selection, and Insertion Sort helped me understand the basics of sorting, Merge Sort and Quick Sort introduced me to recursion and the Divide and Conquer approach, which are important concepts in DSA.</p>
<p>More than just memorizing code, I learned how each algorithm works internally and why different approaches exist for solving the same problem.</p>
<hr />
<h1>🎉 Conclusion</h1>
<p>Learning these five sorting algorithms has been an exciting step in my DSA journey. Each algorithm gave me a new perspective on solving problems and strengthened my understanding of programming concepts.</p>
<p>This is just the beginning of my learning path. Next, I'm planning to explore linked lists, trees, graphs, and many more exciting DSA topics.</p>
<p>I hope this blog helps beginners who are starting with sorting algorithms. If you're learning DSA too, keep practicing consistently and don't hesitate to trace your code step by step—it makes understanding algorithms much easier.</p>
<p>Happy Coding! 🚀</p>
]]></content:encoded></item><item><title><![CDATA[Mastering Searching Algorithms in Python: From Linear Search to Binary Search 🔍]]></title><description><![CDATA[After learning Arrays, the next topic I explored was Searching Algorithms.
At first, searching seemed straightforward. But as I started learning Binary Search, I discovered that it's much more than ju]]></description><link>https://html-portfolio.hashnode.dev/mastering-searching-algorithms-in-python-from-linear-search-to-binary-search</link><guid isPermaLink="true">https://html-portfolio.hashnode.dev/mastering-searching-algorithms-in-python-from-linear-search-to-binary-search</guid><category><![CDATA[Python]]></category><category><![CDATA[Searching Algorithms]]></category><category><![CDATA[linear-search]]></category><category><![CDATA[Binary Search Algorithm]]></category><category><![CDATA[leetcode]]></category><category><![CDATA[data structures]]></category><category><![CDATA[Problem Solving]]></category><dc:creator><![CDATA[Annet]]></dc:creator><pubDate>Wed, 22 Jul 2026 06:39:25 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/56de0f6c-1fa1-49c1-8a32-87f9338d515a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>After learning <strong>Arrays</strong>, the next topic I explored was <strong>Searching Algorithms</strong>.</p>
<p>At first, searching seemed straightforward. But as I started learning <strong>Binary Search</strong>, I discovered that it's much more than just finding an element. Concepts like <strong>First Occurrence, Last Occurrence, Lower Bound, Upper Bound, and Count Occurrences</strong> completely changed how I looked at binary search.</p>
<p>To strengthen my understanding, I also solved several LeetCode problems that helped me apply these concepts in different scenarios.</p>
<p>In this blog, I'll share everything I learned while studying searching algorithms.</p>
<hr />
<h1>Why Do We Need Searching Algorithms?</h1>
<p>Searching is one of the most common operations in programming.</p>
<p>Imagine:</p>
<ul>
<li><p>Finding a student's roll number</p>
</li>
<li><p>Searching for a contact on your phone</p>
</li>
<li><p>Looking up a product on Amazon</p>
</li>
<li><p>Finding a word in a dictionary</p>
</li>
</ul>
<p>Efficient searching makes applications much faster.</p>
<hr />
<h1>Linear Search</h1>
<h2>What is Linear Search?</h2>
<p>Linear Search checks each element one by one until it finds the target.</p>
<p>Example:</p>
<pre><code class="language-python">arr = [12, 45, 78, 23, 90]
target = 23
</code></pre>
<p>It starts from the first element and compares every value.</p>
<pre><code class="language-plaintext">12 ❌

45 ❌

78 ❌

23 ✅
</code></pre>
<hr />
<h2>Python Implementation</h2>
<pre><code class="language-python">def linear_search(arr, target):
    for i in range(len(arr)):
        if arr[i] == target:
            return i
    return -1

arr = [12,45,78,23,90]

print(linear_search(arr,23))
</code></pre>
<hr />
<h2>Time Complexity</h2>
<table>
<thead>
<tr>
<th>Case</th>
<th>Complexity</th>
</tr>
</thead>
<tbody><tr>
<td>Best</td>
<td>O(1)</td>
</tr>
<tr>
<td>Average</td>
<td>O(n)</td>
</tr>
<tr>
<td>Worst</td>
<td>O(n)</td>
</tr>
</tbody></table>
<hr />
<h2>What I Learned</h2>
<p>✔ Simple to implement</p>
<p>✔ Works on both sorted and unsorted arrays</p>
<p>✔ Slow for large datasets</p>
<hr />
<h1>Binary Search</h1>
<h2>What is Binary Search?</h2>
<p>Binary Search repeatedly divides the search space into half.</p>
<p><strong>Important:</strong> The array <strong>must be sorted</strong>.</p>
<p>Example:</p>
<pre><code class="language-plaintext">1 3 5 7 9 11 13
</code></pre>
<p>Suppose we want to find <strong>9</strong>.</p>
<p>Instead of checking every element,</p>
<p>we first check the middle.</p>
<p>If the target is larger,</p>
<p>search the right half.</p>
<p>Otherwise,</p>
<p>search the left half.</p>
<p>This makes Binary Search much faster than Linear Search.</p>
<hr />
<h2>Python Implementation</h2>
<pre><code class="language-python">def binary_search(arr,target):

    left=0
    right=len(arr)-1

    while left&lt;=right:

        mid=(left+right)//2

        if arr[mid]==target:
            return mid

        elif arr[mid]&lt;target:
            left=mid+1

        else:
            right=mid-1

    return -1

arr=[2,4,6,8,10,12]

print(binary_search(arr,10))
</code></pre>
<hr />
<h2>Time Complexity</h2>
<table>
<thead>
<tr>
<th>Case</th>
<th>Complexity</th>
</tr>
</thead>
<tbody><tr>
<td>Best</td>
<td>O(1)</td>
</tr>
<tr>
<td>Average</td>
<td>O(log n)</td>
</tr>
<tr>
<td>Worst</td>
<td>O(log n)</td>
</tr>
</tbody></table>
<hr />
<h2>What I Learned</h2>
<p>✔ Works only on sorted arrays</p>
<p>✔ Eliminates half of the search space every iteration</p>
<p>✔ Extremely efficient for large datasets</p>
<hr />
<h1>Binary Search Variations</h1>
<p>Once I understood normal Binary Search, I learned several useful variations that appear frequently in coding interviews.</p>
<hr />
<h1>Finding the First Occurrence</h1>
<p>Sometimes an array contains duplicate elements.</p>
<p>Example:</p>
<pre><code class="language-plaintext">1 2 4 4 4 6 8
</code></pre>
<p>Searching for <strong>4</strong> should return the first occurrence.</p>
<p>Instead of stopping after finding the target, continue searching towards the <strong>left</strong>.</p>
<hr />
<h2>What I Learned</h2>
<ul>
<li><p>Binary Search can be modified.</p>
</li>
<li><p>Don't stop immediately after finding the element.</p>
</li>
</ul>
<hr />
<h1>Finding the Last Occurrence</h1>
<p>Example</p>
<pre><code class="language-plaintext">1 2 4 4 4 6 8
</code></pre>
<p>Searching for <strong>4</strong> should return the last occurrence.</p>
<p>This time,</p>
<p>continue searching towards the <strong>right</strong> after finding the target.</p>
<hr />
<h2>What I Learned</h2>
<p>The search direction changes depending on what we're trying to find.</p>
<hr />
<h1>Lower Bound</h1>
<h2>Definition</h2>
<p>Lower Bound is the <strong>first element that is greater than or equal to the target</strong>.</p>
<p>Example</p>
<pre><code class="language-plaintext">Array

1 2 4 4 6 8

Target = 4

Lower Bound = Index 2
</code></pre>
<p>Another example</p>
<pre><code class="language-plaintext">Target = 5

Lower Bound = Index 4 (value = 6)
</code></pre>
<hr />
<h2>What I Learned</h2>
<p>Lower Bound doesn't always return the target.</p>
<p>Sometimes it returns the next larger element.</p>
<hr />
<h1>Upper Bound</h1>
<h2>Definition</h2>
<p>Upper Bound is the <strong>first element strictly greater than the target</strong>.</p>
<p>Example</p>
<pre><code class="language-plaintext">Array

1 2 4 4 6 8

Target = 4

Upper Bound = Index 4
</code></pre>
<hr />
<h2>What I Learned</h2>
<p>The only difference from Lower Bound is:</p>
<p>Lower Bound</p>
<pre><code class="language-plaintext">&gt;= target
</code></pre>
<p>Upper Bound</p>
<pre><code class="language-plaintext">&gt; target
</code></pre>
<hr />
<h1>Count Occurrences</h1>
<p>Instead of traversing the entire array,</p>
<p>we can calculate the count using</p>
<pre><code class="language-plaintext">Count = Last Occurrence - First Occurrence + 1
</code></pre>
<p>Example</p>
<pre><code class="language-plaintext">1 2 4 4 4 6

First = 2

Last = 4

Count = 4-2+1

=3
</code></pre>
<p>This is much faster than counting every element individually.</p>
<hr />
<h1>LeetCode Problems I Solved</h1>
<p>To strengthen these concepts, I solved the following LeetCode problems.</p>
<table>
<thead>
<tr>
<th>Problem</th>
<th>What It Taught Me</th>
</tr>
</thead>
<tbody><tr>
<td>Find First and Last Position of Element in Sorted Array</td>
<td>First &amp; Last Occurrence</td>
</tr>
<tr>
<td>Guess Number Higher or Lower</td>
<td>Basic Binary Search</td>
</tr>
<tr>
<td>First Bad Version</td>
<td>Binary Search on Answer</td>
</tr>
<tr>
<td>Arranging Coins</td>
<td>Binary Search on Answer</td>
</tr>
<tr>
<td>Sqrt(x)</td>
<td>Binary Search on Answer</td>
</tr>
</tbody></table>
<hr />
<h2>34. Find First and Last Position</h2>
<h3>What I Learned</h3>
<ul>
<li><p>Binary Search can search both left and right.</p>
</li>
<li><p>Finding first and last occurrence separately.</p>
</li>
</ul>
<hr />
<h2>374. Guess Number Higher or Lower</h2>
<h3>What I Learned</h3>
<ul>
<li><p>Classic Binary Search template.</p>
</li>
<li><p>Updating left and right correctly.</p>
</li>
</ul>
<hr />
<h2>278. First Bad Version</h2>
<h3>What I Learned</h3>
<ul>
<li>Binary Search can find the first valid answer instead of searching for an element.</li>
</ul>
<hr />
<h2>441. Arranging Coins</h2>
<h3>What I Learned</h3>
<ul>
<li><p>Binary Search can solve mathematical problems.</p>
</li>
<li><p>Search on the answer instead of searching an array.</p>
</li>
</ul>
<hr />
<h2>69. Sqrt(x)</h2>
<h3>What I Learned</h3>
<ul>
<li><p>Binary Search can efficiently calculate square roots.</p>
</li>
<li><p>Avoid using built-in functions.</p>
</li>
</ul>
<hr />
<h1>Linear Search vs Binary Search</h1>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Linear Search</th>
<th>Binary Search</th>
</tr>
</thead>
<tbody><tr>
<td>Sorted Array Required</td>
<td>❌ No</td>
<td>✅ Yes</td>
</tr>
<tr>
<td>Time Complexity</td>
<td>O(n)</td>
<td>O(log n)</td>
</tr>
<tr>
<td>Easy to Implement</td>
<td>✅</td>
<td>✅</td>
</tr>
<tr>
<td>Efficient for Large Data</td>
<td>❌</td>
<td>✅</td>
</tr>
</tbody></table>
<hr />
<h1>Key Takeaways</h1>
<p>After completing this topic, I learned:</p>
<p>✅ Linear Search</p>
<p>✅ Binary Search</p>
<p>✅ First Occurrence</p>
<p>✅ Last Occurrence</p>
<p>✅ Lower Bound</p>
<p>✅ Upper Bound</p>
<p>✅ Count Occurrences</p>
<p>✅ Binary Search on Answer</p>
<p>✅ Applying Binary Search in LeetCode problems</p>
<p>More importantly, I realized that Binary Search isn't just about finding an element—it's a powerful problem-solving technique that can be adapted to many different types of questions.</p>
<hr />
<h1>Conclusion</h1>
<p>Mastering searching algorithms has given me a stronger foundation in Data Structures and Algorithms. Every problem I solved taught me something new—whether it was improving efficiency, recognizing patterns, or thinking differently about a solution.</p>
<p>This is just one milestone in my DSA journey, and I know there is still much more to learn. I'll continue documenting what I learn, the challenges I face, and the lessons I gain along the way.</p>
<p>I hope this blog helps anyone who's beginning their own DSA journey. If you're learning too, keep practicing, stay consistent, and enjoy the process.</p>
<p>See you in the next blog! 👋</p>
<p>Happy Coding! 💻🚀</p>
]]></content:encoded></item><item><title><![CDATA[ Codeforces Journey #3: Learning Arrays Through Beginner-Friendly Problems]]></title><description><![CDATA[After solving my first 20 Codeforces problems, I decided to focus on one of the most fundamental topics in Data Structures—Arrays.
Instead of randomly solving problems, I chose problems that helped me]]></description><link>https://html-portfolio.hashnode.dev/codeforces-journey-3-learning-arrays-through-beginner-friendly-problems</link><guid isPermaLink="true">https://html-portfolio.hashnode.dev/codeforces-journey-3-learning-arrays-through-beginner-friendly-problems</guid><category><![CDATA[Codeforces]]></category><category><![CDATA[Python]]></category><category><![CDATA[arrays]]></category><category><![CDATA[data structures]]></category><category><![CDATA[Competitive programming]]></category><category><![CDATA[problem solving skills]]></category><category><![CDATA[coding journey]]></category><dc:creator><![CDATA[Annet]]></dc:creator><pubDate>Sat, 18 Jul 2026 14:43:28 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/26872e56-3c31-45e8-b6dd-fac0d2149727.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>After solving my first 20 Codeforces problems, I decided to focus on one of the most fundamental topics in Data Structures—<strong>Arrays</strong>.</p>
<p>Instead of randomly solving problems, I chose problems that helped me understand array traversal, sorting, counting, mapping, and basic problem-solving techniques. These problems taught me that arrays are much more than just storing numbers—they're about identifying patterns and manipulating data efficiently.</p>
<p>Here are the array-focused problems I solved and what I learned from each one.</p>
<hr />
<h1>1. Kefa and First Steps (580A)</h1>
<h3>🎯 Problem Statement</h3>
<p>Given an array of integers, find the length of the longest non-decreasing contiguous segment.</p>
<hr />
<h3>💡 My Approach</h3>
<p>I traversed the array once while keeping track of:</p>
<ul>
<li><p>Current non-decreasing segment length</p>
</li>
<li><p>Maximum segment length found so far</p>
</li>
</ul>
<p>Whenever the next element was greater than or equal to the previous one, I extended the current segment. Otherwise, I reset the count.</p>
<hr />
<h3>📚 Concepts Used</h3>
<p>✔ Array Traversal</p>
<p>✔ Linear Scan</p>
<p>✔ Comparing Adjacent Elements</p>
<hr />
<h3>💻 Solution Code</h3>
<pre><code class="language-python">n = int(input())
arr = list(map(int, input().split()))

current = 1
maximum = 1

for i in range(1, n):
    if arr[i] &gt;= arr[i - 1]:
        current += 1
    else:
        current = 1

    maximum = max(maximum, current)

print(maximum)
</code></pre>
<hr />
<h3>📖 What I Learned</h3>
<ul>
<li><p>Traversing arrays efficiently.</p>
</li>
<li><p>Comparing adjacent elements.</p>
</li>
<li><p>Maintaining running values while scanning an array.</p>
</li>
</ul>
<hr />
<h1>2. Drinks (200B)</h1>
<h3>🎯 Problem Statement</h3>
<p>Given the percentage of orange juice in each drink, calculate the percentage of orange juice in the mixture.</p>
<hr />
<h3>💡 My Approach</h3>
<p>I stored all percentages in an array, calculated their sum, and divided it by the number of drinks.</p>
<hr />
<h3>📚 Concepts Used</h3>
<p>✔ Array Traversal</p>
<p>✔ Sum of Elements</p>
<p>✔ Average Calculation</p>
<hr />
<h3>💻 Solution Code</h3>
<pre><code class="language-python">n = int(input())
arr = list(map(int, input().split()))

print(sum(arr) / n)
</code></pre>
<hr />
<h3>📖 What I Learned</h3>
<ul>
<li><p>Reading arrays from input.</p>
</li>
<li><p>Using Python's built-in <code>sum()</code>.</p>
</li>
<li><p>Finding averages using arrays.</p>
</li>
</ul>
<hr />
<h1>3. Gravity Flip (405A)</h1>
<h3>🎯 Problem Statement</h3>
<p>After gravity changes direction, the cubes rearrange themselves.</p>
<p>Print the final heights.</p>
<hr />
<h3>💡 My Approach</h3>
<p>Instead of simulating gravity, I realized the final arrangement is simply the sorted array.</p>
<hr />
<h3>📚 Concepts Used</h3>
<p>✔ Sorting</p>
<p>✔ Arrays</p>
<hr />
<h3>💻 Solution Code</h3>
<pre><code class="language-python">n = int(input())
arr = list(map(int, input().split()))

arr.sort()

print(*arr)
</code></pre>
<hr />
<h3>📖 What I Learned</h3>
<ul>
<li><p>Sometimes sorting is enough to solve simulation problems.</p>
</li>
<li><p>Python's <code>sort()</code> is very useful.</p>
</li>
</ul>
<hr />
<h1>4. Is your horseshoe on the other hoof? (228A)</h1>
<h3>🎯 Problem Statement</h3>
<p>Valera wants four horseshoes of different colors.</p>
<p>Find how many additional horseshoes he needs to buy.</p>
<hr />
<h3>💡 My Approach</h3>
<p>I used a set to remove duplicate colors.</p>
<p>The answer is:</p>
<pre><code class="language-plaintext">4 - Number of Unique Colors
</code></pre>
<hr />
<h3>📚 Concepts Used</h3>
<p>✔ Sets</p>
<p>✔ Counting Distinct Elements</p>
<p>✔ Arrays</p>
<hr />
<h3>💻 Solution Code</h3>
<pre><code class="language-python">arr = list(map(int, input().split()))

print(4 - len(set(arr)))
</code></pre>
<hr />
<h3>📖 What I Learned</h3>
<ul>
<li><p>Sets automatically remove duplicates.</p>
</li>
<li><p>Counting unique values becomes much easier.</p>
</li>
</ul>
<hr />
<h1>5. Presents (136A)</h1>
<h3>🎯 Problem Statement</h3>
<p>Each friend gives a gift to exactly one other friend.</p>
<p>Find who gave a gift to each friend.</p>
<hr />
<h3>💡 My Approach</h3>
<p>The input provides:</p>
<pre><code class="language-plaintext">Friend → Receiver
</code></pre>
<p>I needed:</p>
<pre><code class="language-plaintext">Receiver → Friend
</code></pre>
<p>So I created another array and reversed the mapping while traversing the original array.</p>
<hr />
<h3>📚 Concepts Used</h3>
<p>✔ Arrays</p>
<p>✔ Indexing</p>
<p>✔ Reverse Mapping</p>
<hr />
<h3>💻 Solution Code</h3>
<pre><code class="language-python">n = int(input())
arr = list(map(int, input().split()))

answer = [0] * n

for i in range(n):
    answer[arr[i] - 1] = i + 1

print(*answer)
</code></pre>
<hr />
<h3>📖 What I Learned</h3>
<ul>
<li><p>Arrays can also be used for mapping relationships.</p>
</li>
<li><p>Careful indexing can avoid extra loops.</p>
</li>
</ul>
<hr />
<h1>🌱 Key Takeaways</h1>
<p>These five problems introduced me to some of the most important array concepts:</p>
<ul>
<li><p>✅ Reading and traversing arrays</p>
</li>
<li><p>✅ Finding the longest segment</p>
</li>
<li><p>✅ Computing sums and averages</p>
</li>
<li><p>✅ Sorting arrays</p>
</li>
<li><p>✅ Counting distinct elements</p>
</li>
<li><p>✅ Using sets with arrays</p>
</li>
<li><p>✅ Reverse mapping using arrays</p>
</li>
</ul>
<p>Although these problems are beginner-friendly, they helped me understand the building blocks of many Data Structures and Algorithms problems.</p>
<hr />
<h1>🎯 What's Next?</h1>
<p>My current progress:</p>
<ul>
<li><p>✅ More than <strong>20 Codeforces problems solved</strong></p>
</li>
<li><p>✅ Learning Data Structures one topic at a time</p>
</li>
<li><p>✅ Building consistency through daily practice</p>
</li>
</ul>
<p>Next, I'll continue exploring:</p>
<ul>
<li><p>Prefix Sum</p>
</li>
<li><p>Two Pointers</p>
</li>
<li><p>Sliding Window</p>
</li>
<li><p>Binary Search</p>
</li>
<li><p>More 800–1000 rated Codeforces problems</p>
</li>
</ul>
<p>Every solved problem strengthens my problem-solving skills and teaches me a new way of thinking.</p>
<p>Thanks for reading, and happy coding! 🚀</p>
<hr />
]]></content:encoded></item><item><title><![CDATA[Arrays in Python: A Beginner's Guide to Common Operations]]></title><description><![CDATA[Arrays are one of the first data structures every programmer learns. They allow us to store multiple values in a single variable and access them efficiently using indexes.
In Python, we commonly use l]]></description><link>https://html-portfolio.hashnode.dev/arrays-in-python-a-beginner-s-guide-to-common-operations</link><guid isPermaLink="true">https://html-portfolio.hashnode.dev/arrays-in-python-a-beginner-s-guide-to-common-operations</guid><category><![CDATA[Python]]></category><category><![CDATA[arrays]]></category><category><![CDATA[data structures]]></category><category><![CDATA[DSA]]></category><category><![CDATA[PythonProgramming]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[coding]]></category><category><![CDATA[Learning Journey]]></category><dc:creator><![CDATA[Annet]]></dc:creator><pubDate>Thu, 16 Jul 2026 06:55:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/8af4c8b8-cb6f-483a-b22e-87c63f06148a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Arrays are one of the first data structures every programmer learns. They allow us to store multiple values in a single variable and access them efficiently using indexes.</p>
<p>In Python, we commonly use <strong>lists</strong> to represent arrays because they are flexible and easy to work with.</p>
<p>Let's explore the most common array operations with examples.</p>
<hr />
<h1>Creating an Array</h1>
<pre><code class="language-python">arr = [10, 20, 30, 40, 50]
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">[10, 20, 30, 40, 50]
</code></pre>
<hr />
<h1>Accessing Elements</h1>
<p>Each element has an index starting from <strong>0</strong>.</p>
<pre><code class="language-python">arr = [10, 20, 30, 40, 50]

print(arr[0])
print(arr[2])
print(arr[-1])
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">10
30
50
</code></pre>
<p>Time Complexity: <strong>O(1)</strong></p>
<hr />
<h1>Adding Elements</h1>
<h2>1. Add at the End</h2>
<pre><code class="language-python">arr.append(60)

print(arr)
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">[10, 20, 30, 40, 50, 60]
</code></pre>
<hr />
<h2>2. Insert at a Specific Position</h2>
<pre><code class="language-python">arr.insert(2, 25)

print(arr)
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">[10, 20, 25, 30, 40, 50]
</code></pre>
<hr />
<h2>3. Extend an Array</h2>
<p>Use <code>extend()</code> to add multiple elements.</p>
<pre><code class="language-python">arr.extend([60, 70, 80])

print(arr)
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">[10, 20, 30, 40, 50, 60, 70, 80]
</code></pre>
<hr />
<h1>Removing Elements</h1>
<h2>Remove by Value</h2>
<pre><code class="language-python">arr.remove(30)

print(arr)
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">[10, 20, 40, 50]
</code></pre>
<hr />
<h2>Remove by Index</h2>
<pre><code class="language-python">arr.pop(2)

print(arr)
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">[10, 20, 40, 50]
</code></pre>
<hr />
<h2>Delete Using <code>del</code></h2>
<pre><code class="language-python">del arr[1]

print(arr)
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">[10, 30, 40, 50]
</code></pre>
<hr />
<h1>Slicing</h1>
<p>Slicing allows us to extract a portion of an array.</p>
<pre><code class="language-python">arr = [10, 20, 30, 40, 50, 60]

print(arr[1:4])
print(arr[:3])
print(arr[3:])
print(arr[::-1])
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">[20, 30, 40]
[10, 20, 30]
[40, 50, 60]
[60, 50, 40, 30, 20, 10]
</code></pre>
<hr />
<h1>Searching Elements</h1>
<h2>Using <code>in</code></h2>
<pre><code class="language-python">arr = [10, 20, 30, 40]

print(30 in arr)
print(100 in arr)
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">True
False
</code></pre>
<hr />
<h2>Using <code>index()</code></h2>
<pre><code class="language-python">print(arr.index(40))
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">3
</code></pre>
<hr />
<h1>Counting Elements</h1>
<p>Find how many times an element appears.</p>
<pre><code class="language-python">arr = [10, 20, 10, 30, 10]

print(arr.count(10))
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">3
</code></pre>
<hr />
<h1>Reversing an Array</h1>
<h2>Method 1: Using <code>reverse()</code></h2>
<pre><code class="language-python">arr.reverse()

print(arr)
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">[50, 40, 30, 20, 10]
</code></pre>
<hr />
<h2>Method 2: Using Slicing</h2>
<pre><code class="language-python">print(arr[::-1])
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">[50, 40, 30, 20, 10]
</code></pre>
<hr />
<h1>Other Useful Operations</h1>
<h2>Length of an Array</h2>
<pre><code class="language-python">print(len(arr))
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">5
</code></pre>
<hr />
<h2>Maximum Element</h2>
<pre><code class="language-python">print(max(arr))
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">50
</code></pre>
<hr />
<h2>Minimum Element</h2>
<pre><code class="language-python">print(min(arr))
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">10
</code></pre>
<hr />
<h2>Sum of Elements</h2>
<pre><code class="language-python">print(sum(arr))
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">150
</code></pre>
<hr />
<h2>Sorting</h2>
<p>Ascending Order</p>
<pre><code class="language-python">arr.sort()

print(arr)
</code></pre>
<p>Descending Order</p>
<pre><code class="language-python">arr.sort(reverse=True)

print(arr)
</code></pre>
<hr />
<h1>Time Complexity of Common Operations</h1>
<table>
<thead>
<tr>
<th>Operation</th>
<th>Time Complexity</th>
</tr>
</thead>
<tbody><tr>
<td>Access Element</td>
<td>O(1)</td>
</tr>
<tr>
<td>Search (<code>in</code>, <code>index</code>)</td>
<td>O(n)</td>
</tr>
<tr>
<td>Append</td>
<td>O(1) (Average)</td>
</tr>
<tr>
<td>Insert</td>
<td>O(n)</td>
</tr>
<tr>
<td>Remove</td>
<td>O(n)</td>
</tr>
<tr>
<td>Pop (Last Element)</td>
<td>O(1)</td>
</tr>
<tr>
<td>Pop (Middle)</td>
<td>O(n)</td>
</tr>
<tr>
<td>Count</td>
<td>O(n)</td>
</tr>
<tr>
<td>Reverse</td>
<td>O(n)</td>
</tr>
<tr>
<td>Extend</td>
<td>O(k) <em>(k = number of new elements)</em></td>
</tr>
<tr>
<td>Slice</td>
<td>O(k) <em>(k = size of slice)</em></td>
</tr>
<tr>
<td>Sort</td>
<td>O(n log n)</td>
</tr>
</tbody></table>
<hr />
<h1>Why Learn Array Operations?</h1>
<p>Array operations are the foundation of Data Structures and Algorithms. Most coding interview questions begin with manipulating arrays, such as searching, inserting, deleting, reversing, or traversing elements.</p>
<p>Mastering these basic operations will make it easier to solve more advanced problems using techniques like <strong>Two Pointers</strong>, <strong>Sliding Window</strong>, <strong>Prefix Sum</strong>, and <strong>Binary Search</strong>.</p>
<hr />
<h1>Conclusion</h1>
<p>Arrays may seem simple, but they are one of the most powerful and frequently used data structures in programming. Understanding how to create, access, add, remove, search, slice, reverse, count, and extend arrays gives you a strong foundation for solving real-world programming problems and coding interview questions.</p>
<p>Every great DSA journey starts with mastering the basics—and arrays are the perfect place to begin.</p>
<p>Happy Coding!</p>
]]></content:encoded></item><item><title><![CDATA[🧠 Solving My Next 10 Codeforces Problems | Codeforces Journey #2]]></title><description><![CDATA[After completing my first 10 Codeforces problems, I continued solving another set of beginner-friendly implementation problems. These problems strengthened my understanding of Python and helped me thi]]></description><link>https://html-portfolio.hashnode.dev/solving-my-next-10-codeforces-problems-codeforces-journey-2</link><guid isPermaLink="true">https://html-portfolio.hashnode.dev/solving-my-next-10-codeforces-problems-codeforces-journey-2</guid><category><![CDATA[Codeforces]]></category><category><![CDATA[Python]]></category><category><![CDATA[Competitive programming]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[DSA]]></category><dc:creator><![CDATA[Annet]]></dc:creator><pubDate>Mon, 06 Jul 2026 06:37:54 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/b6831887-ff06-4a2e-977f-6af85f3e6ed1.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>After completing my first 10 Codeforces problems, I continued solving another set of beginner-friendly implementation problems. These problems strengthened my understanding of Python and helped me think more logically before jumping into code.</p>
<p>Instead of focusing only on syntax, I started paying more attention to understanding the problem statement, identifying patterns, and choosing the right approach.</p>
<p>Here are the next 10 problems I solved, along with my approach, solution, and key takeaways.</p>
<hr />
<h2>1. Is your horseshoe on the other hoof? (228A)</h2>
<h3>🎯 What the problem asks</h3>
<p>Valera wants to wear four horseshoes of different colors. Find the minimum number of horseshoes he needs to buy.</p>
<h3>💡 Approach</h3>
<p>The easiest way to detect duplicate colors is by using a <strong>set</strong>, which automatically removes duplicates.</p>
<p>The answer is simply:</p>
<pre><code class="language-plaintext">4 - Number of unique colors
</code></pre>
<h3>📚 Concepts Used</h3>
<p>✔ Sets</p>
<p>✔ Duplicate Removal</p>
<p>✔ Length</p>
<h3>💻 Solution Code</h3>
<pre><code class="language-python">s = list(map(int, input().split()))

print(4 - len(set(s)))
</code></pre>
<h3>📖 What I Learned</h3>
<ul>
<li><p>Sets automatically remove duplicate values.</p>
</li>
<li><p>Sometimes counting unique elements is easier than counting duplicates.</p>
</li>
</ul>
<hr />
<h2>2. Presents (136A)</h2>
<h3>🎯 What the problem asks</h3>
<p>Given who each friend gave a gift to, determine who gave a gift to each friend.</p>
<h3>💡 Approach</h3>
<p>The input gives:</p>
<pre><code class="language-plaintext">Friend → Receiver
</code></pre>
<p>The output asks for:</p>
<pre><code class="language-plaintext">Receiver → Friend
</code></pre>
<p>So I built the reverse mapping while reading the input.</p>
<h3>📚 Concepts Used</h3>
<p>✔ Lists</p>
<p>✔ Indexing</p>
<p>✔ Reverse Mapping</p>
<h3>💻 Solution Code</h3>
<pre><code class="language-python">n = int(input())
p = list(map(int, input().split()))

ans = [0] * n

for i in range(n):
    ans[p[i] - 1] = i + 1

print(*ans)
</code></pre>
<h3>📖 What I Learned</h3>
<ul>
<li><p>Reverse mapping is a useful technique.</p>
</li>
<li><p>Indexing carefully helps avoid unnecessary loops.</p>
</li>
</ul>
<hr />
<h2>3. I Wanna Be the Guy (469A)</h2>
<h3>🎯 What the problem asks</h3>
<p>Determine whether two friends together can complete every level in the game.</p>
<h3>💡 Approach</h3>
<p>Combine the levels completed by both players.</p>
<p>Remove duplicates using a set.</p>
<p>If the number of unique levels equals <strong>n</strong>, they can complete the game.</p>
<h3>📚 Concepts Used</h3>
<p>✔ Sets</p>
<p>✔ Union</p>
<p>✔ Conditions</p>
<h3>💻 Solution Code</h3>
<pre><code class="language-python">n = int(input())

x = list(map(int, input().split()))
y = list(map(int, input().split()))

levels = set(x[1:] + y[1:])

if len(levels) == n:
    print("I become the guy.")
else:
    print("Oh, my keyboard!")
</code></pre>
<h3>📖 What I Learned</h3>
<ul>
<li><p>Set union makes merging data simple.</p>
</li>
<li><p>Reading the input format carefully is very important.</p>
</li>
</ul>
<hr />
<h2>4. Beautiful Year (271A)</h2>
<h3>🎯 What the problem asks</h3>
<p>Find the next year whose digits are all distinct.</p>
<h3>💡 Approach</h3>
<p>Keep checking the next year until every digit becomes unique.</p>
<h3>📚 Concepts Used</h3>
<p>✔ While Loop</p>
<p>✔ Strings</p>
<p>✔ Sets</p>
<h3>💻 Solution Code</h3>
<pre><code class="language-python">y = int(input())

while True:
    y += 1

    if len(str(y)) == len(set(str(y))):
        print(y)
        break
</code></pre>
<h3>📖 What I Learned</h3>
<ul>
<li><p>Converting numbers into strings makes digit-based problems much easier.</p>
</li>
<li><p>Sets are useful for uniqueness checking.</p>
</li>
</ul>
<hr />
<h1>5. New Year and Hurry (750A)</h1>
<h3>🎯 What the problem asks</h3>
<p>Limak has <strong>240 minutes</strong> before midnight, but he also needs some time to travel to the New Year party. Find the maximum number of contest problems he can solve before leaving.</p>
<h3>💡 Approach</h3>
<p>First, calculate the time available for solving problems:</p>
<pre><code class="language-text">Available Time = 240 - k
</code></pre>
<p>Then, keep adding the time required for each problem (<code>5 × i</code>) until the total exceeds the available time.</p>
<h3>📚 Concepts Used</h3>
<p>✔ Loops</p>
<p>✔ Conditions</p>
<p>✔ Simulation</p>
<p>✔ Accumulation</p>
<h3>💻 Solution Code</h3>
<pre><code class="language-python">n, k = map(int, input().split())

time = 240 - k
total = 0
count = 0

for i in range(1, n + 1):
    total += i * 5
    if total &lt;= time:
        count += 1
    else:
        break

print(count)
</code></pre>
<h3>📖 What I Learned</h3>
<ul>
<li><p>Solving problems step by step using simulation.</p>
</li>
<li><p>Knowing when to stop a loop using <code>break</code>.</p>
</li>
<li><p>Calculating cumulative values.</p>
</li>
</ul>
<hr />
<h1>6. Soldier and Bananas (546A)</h1>
<h3>🎯 What the problem asks</h3>
<p>A soldier wants to buy several bananas where the price of each banana increases. Find how much money he needs to borrow if he doesn't have enough money.</p>
<h3>💡 Approach</h3>
<p>Calculate the total cost of buying all bananas.</p>
<p>If the total cost is greater than the money he already has, print the difference.</p>
<p>Otherwise, print <strong>0</strong>.</p>
<h3>📚 Concepts Used</h3>
<p>✔ Loops</p>
<p>✔ Arithmetic Operations</p>
<p>✔ Conditions</p>
<h3>💻 Solution Code</h3>
<pre><code class="language-python">k, n, w = map(int, input().split())

total = 0

for i in range(1, w + 1):
    total += k * i

if total &gt; n:
    print(total - n)
else:
    print(0)
</code></pre>
<h3>📖 What I Learned</h3>
<ul>
<li><p>Calculating cumulative sums.</p>
</li>
<li><p>Handling multiple conditions correctly.</p>
</li>
<li><p>Writing cleaner logic using loops.</p>
</li>
</ul>
<hr />
<h1>7. Wrong Subtraction (977A)</h1>
<h3>🎯 What the problem asks</h3>
<p>Perform subtraction <strong>k</strong> times.</p>
<p>If the last digit of the number is <strong>0</strong>, remove that digit.</p>
<p>Otherwise, subtract <strong>1</strong>.</p>
<h3>💡 Approach</h3>
<p>Repeat the given operation exactly <strong>k</strong> times.</p>
<p>Use modulus (<code>%</code>) to check the last digit and integer division (<code>//</code>) to remove the last digit.</p>
<h3>📚 Concepts Used</h3>
<p>✔ While Loop</p>
<p>✔ Modulus</p>
<p>✔ Integer Division</p>
<p>✔ Conditions</p>
<h3>💻 Solution Code</h3>
<pre><code class="language-python">n, k = map(int, input().split())

while k &gt; 0:
    if n % 10 == 0:
        n = n // 10
    else:
        n -= 1
    k -= 1

print(n)
</code></pre>
<h3>📖 What I Learned</h3>
<ul>
<li><p>Using <code>%</code> to access the last digit.</p>
</li>
<li><p>Using <code>//</code> to remove digits.</p>
</li>
<li><p>Repeating operations with a <code>while</code> loop.</p>
</li>
</ul>
<hr />
<h1>8. Elephant (617A)</h1>
<h3>🎯 What the problem asks</h3>
<p>An elephant wants to reach his friend's house.</p>
<p>In one move, he can walk <strong>1, 2, 3, 4, or 5</strong> steps.</p>
<p>Find the minimum number of moves required.</p>
<h3>💡 Approach</h3>
<p>Since the elephant can move a maximum of <strong>5</strong> steps at once, always taking the largest possible step minimizes the number of moves.</p>
<p>If the distance is not exactly divisible by <strong>5</strong>, one extra move is required.</p>
<h3>📚 Concepts Used</h3>
<p>✔ Integer Division</p>
<p>✔ Modulus</p>
<p>✔ Conditions</p>
<h3>💻 Solution Code</h3>
<pre><code class="language-python">x = int(input())

if x % 5 == 0:
    print(x // 5)
else:
    print((x // 5) + 1)
</code></pre>
<h3>📖 What I Learned</h3>
<ul>
<li><p>Breaking a problem into complete groups and a remaining part.</p>
</li>
<li><p>Applying greedy thinking for simple optimization problems.</p>
</li>
<li><p>Using integer division effectively.</p>
</li>
</ul>
<hr />
<h1>9. Bear and Big Brother (791A)</h1>
<h3>🎯 What the problem asks</h3>
<p>Limak's weight triples every year, while Bob's weight doubles every year.</p>
<p>Find how many years it takes for Limak to become heavier than Bob.</p>
<h3>💡 Approach</h3>
<p>Update both weights every year.</p>
<p>Count the number of years until Limak's weight becomes greater than Bob's.</p>
<h3>📚 Concepts Used</h3>
<p>✔ While Loop</p>
<p>✔ Simulation</p>
<p>✔ Variable Updates</p>
<h3>💻 Solution Code</h3>
<pre><code class="language-python">a, b = map(int, input().split())

years = 0

while a &lt;= b:
    a *= 3
    b *= 2
    years += 1

print(years)
</code></pre>
<h3>📖 What I Learned</h3>
<ul>
<li><p>Simulating changes over time.</p>
</li>
<li><p>Updating multiple variables inside a loop.</p>
</li>
<li><p>Using loop conditions correctly.</p>
</li>
</ul>
<hr />
<h1>10. Anton and Danik (734A)</h1>
<h3>🎯 What the problem asks</h3>
<p>Anton and Danik play several games.</p>
<p>Each game is represented by:</p>
<ul>
<li><p><code>A</code> → Anton wins</p>
</li>
<li><p><code>D</code> → Danik wins</p>
</li>
</ul>
<p>Determine who wins more games.</p>
<h3>💡 Approach</h3>
<p>Count the number of <code>'A'</code> and <code>'D'</code> characters in the string.</p>
<p>Compare the counts and print the winner.</p>
<p>If both counts are equal, print <strong>Friendship</strong>.</p>
<h3>📚 Concepts Used</h3>
<p>✔ Strings</p>
<p>✔ Counting</p>
<p>✔ Conditions</p>
<h3>💻 Solution Code</h3>
<pre><code class="language-python">n = int(input())
games = input()

anton = games.count("A")
danik = games.count("D")

if anton &gt; danik:
    print("Anton")
elif danik &gt; anton:
    print("Danik")
else:
    print("Friendship")
</code></pre>
<h3>📖 What I Learned</h3>
<ul>
<li><p>Counting character occurrences in strings.</p>
</li>
<li><p>Comparing multiple conditions.</p>
</li>
<li><p>Using built-in string functions effectively.</p>
</li>
</ul>
<hr />
<h1>🚀 What's Next?</h1>
<p>My current progress:</p>
<p><strong>✅ 20 Codeforces Problems Solved</strong></p>
<h3>My next goals are:</h3>
<ul>
<li><p>🎯 Reach <strong>50 solved Codeforces problems</strong></p>
</li>
<li><p>🎯 Solve <strong>900–1000 rated</strong> implementation problems consistently</p>
</li>
<li><p>🎯 Improve my problem-solving speed</p>
</li>
<li><p>🎯 Build a stronger foundation in Data Structures and Algorithms</p>
</li>
</ul>
<p>Every problem teaches me a new way of thinking, and I'm excited to continue this journey one challenge at a time.</p>
<hr />
]]></content:encoded></item><item><title><![CDATA[My Codeforces Problem Solving Journey — Beginner Level 🧩]]></title><description><![CDATA[As part of improving my problem-solving skills, I started solving beginner problems on Codeforces.
These problems helped me strengthen my basics in Python and improve my logical thinking.
Here are the]]></description><link>https://html-portfolio.hashnode.dev/my-codeforces-problem-solving-journey-beginner-level</link><guid isPermaLink="true">https://html-portfolio.hashnode.dev/my-codeforces-problem-solving-journey-beginner-level</guid><category><![CDATA[code]]></category><category><![CDATA[Codeforces]]></category><category><![CDATA[Problem Solving]]></category><category><![CDATA[logical-thinking]]></category><category><![CDATA[Python]]></category><category><![CDATA[python beginner]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[Learning Journey]]></category><dc:creator><![CDATA[Annet]]></dc:creator><pubDate>Mon, 29 Jun 2026 18:38:59 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/34c9f77c-338e-4a62-b092-f9c012e39ac4.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As part of improving my problem-solving skills, I started solving beginner problems on Codeforces.</p>
<p>These problems helped me strengthen my basics in Python and improve my logical thinking.</p>
<p>Here are the problems I solved and what I learned from them.</p>
<hr />
<h1>1. Team (231A)</h1>
<h2>What the problem asks</h2>
<p>Three friends decide whether they will solve a problem only if at least two of them are sure about the solution.</p>
<p>We need to count how many problems they will solve.</p>
<h2>What I understood</h2>
<p>This problem mainly checks counting logic.</p>
<p>For each problem:</p>
<ul>
<li><p>count the number of <code>1</code>s</p>
</li>
<li><p>if count ≥ 2, increase answer</p>
</li>
</ul>
<h2>Concepts used</h2>
<p>✔ Loops ✔ Conditions ✔ Lists</p>
<h2>Solution Code</h2>
<pre><code class="language-python">n = int(input())
count = 0

for i in range(n):
    row = list(map(int, input().split()))
    if sum(row) &gt;= 2:
        count += 1

print(count)
</code></pre>
<h2>What I learned</h2>
<ul>
<li><p>How to count values inside a list</p>
</li>
<li><p>How to process multiple test cases</p>
</li>
</ul>
<hr />
<h1>2. Next Round (158A)</h1>
<h2>What the problem asks</h2>
<p>Find how many participants move to the next round based on score.</p>
<h2>What I understood</h2>
<p>A participant qualifies if:</p>
<ul>
<li><p>score is greater than 0</p>
</li>
<li><p>score is greater than or equal to the kth participant’s score</p>
</li>
</ul>
<h2>Concepts used</h2>
<p>✔ Lists ✔ Indexing ✔ Conditions</p>
<h2>Solution Code</h2>
<pre><code class="language-python">n, k = map(int, input().split())
scores = list(map(int, input().split()))

count = 0

for i in range(n):
    if scores[i] &gt;= scores[k-1] and scores[i] &gt; 0:
        count += 1

print(count)
</code></pre>
<h2>What I learned</h2>
<ul>
<li><p>Handling conditions carefully</p>
</li>
<li><p>Working with array positions</p>
</li>
</ul>
<hr />
<h1>3. Bit++ (282A)</h1>
<h2>What the problem asks</h2>
<p>Perform increment or decrement based on operations.</p>
<h2>What I understood</h2>
<p>If the statement contains <code>++</code>, increase value. If it contains <code>--</code>, decrease value.</p>
<h2>Concepts used</h2>
<p>✔ Strings ✔ Conditions ✔ Loops</p>
<h2>Solution Code</h2>
<pre><code class="language-python">n = int(input())
x = 0

for i in range(n):
    s = input()

    if "++" in s:
        x += 1
    else:
        x -= 1

print(x)
</code></pre>
<h2>What I learned</h2>
<ul>
<li><p>String checking</p>
</li>
<li><p>Updating variables repeatedly</p>
</li>
</ul>
<hr />
<h1>4. Boy or Girl (236A)</h1>
<h2>What the problem asks</h2>
<p>Check whether the username has odd or even number of distinct characters.</p>
<h2>What I understood</h2>
<p>Use a set to remove duplicates.</p>
<p>Count unique characters.</p>
<h2>Concepts used</h2>
<p>✔ Sets ✔ Length ✔ Conditions</p>
<h2>Solution Code</h2>
<pre><code class="language-python">name = input()

if len(set(name)) % 2 == 0:
    print("CHAT WITH HER!")
else:
    print("IGNORE HIM!")
</code></pre>
<h2>What I learned</h2>
<ul>
<li><p>Practical use of sets</p>
</li>
<li><p>Removing duplicates efficiently</p>
</li>
</ul>
<hr />
<h1>5. Word Capitalization (281A)</h1>
<h2>What the problem asks</h2>
<p>Capitalize only the first letter of the word.</p>
<h2>What I understood</h2>
<p>Take first character, convert it to uppercase, and join with remaining characters.</p>
<h2>Concepts used</h2>
<p>✔ Strings ✔ Slicing</p>
<h2>Solution Code</h2>
<pre><code class="language-python">word = input()

print(word[0].upper() + word[1:])
</code></pre>
<h2>What I learned</h2>
<ul>
<li><p>String slicing</p>
</li>
<li><p>String methods</p>
</li>
</ul>
<hr />
<h1>6. Petya and Strings (112A)</h1>
<h2>What the problem asks</h2>
<p>Compare two strings without considering case.</p>
<h2>What I understood</h2>
<p>Convert both strings into same case and compare.</p>
<h2>Concepts used</h2>
<p>✔ Strings ✔ Lowercase conversion</p>
<h2>Solution Code</h2>
<pre><code class="language-python">a = input().lower()
b = input().lower()

if a &lt; b:
    print(-1)
elif a &gt; b:
    print(1)
else:
    print(0)
</code></pre>
<h2>What I learned</h2>
<ul>
<li><p>Case-insensitive comparison</p>
</li>
<li><p>Lexicographical order</p>
</li>
</ul>
<hr />
<h1>7. Word (59A)</h1>
<h2>What the problem asks</h2>
<p>Convert the word into uppercase or lowercase depending on majority.</p>
<h2>What I understood</h2>
<p>Count uppercase and lowercase letters.</p>
<p>If uppercase &gt; lowercase: convert all to uppercase. Else lowercase.</p>
<h2>Concepts used</h2>
<p>✔ Strings ✔ Loops ✔ Conditions</p>
<h2>Solution Code</h2>
<pre><code class="language-python">word = input()

upper = 0
lower = 0

for ch in word:
    if ch.isupper():
        upper += 1
    else:
        lower += 1

if upper &gt; lower:
    print(word.upper())
else:
    print(word.lower())
</code></pre>
<h2>What I learned</h2>
<ul>
<li><p>Character checking</p>
</li>
<li><p>Counting conditions</p>
</li>
</ul>
<hr />
<h1>8. Stones on the Table (266A)</h1>
<h2>What the problem asks</h2>
<p>Count how many stones need to be removed if adjacent colors are same.</p>
<h2>What I understood</h2>
<p>Compare each stone with the next one.</p>
<p>If same: increase count.</p>
<h2>Concepts used</h2>
<p>✔ Strings ✔ Loops ✔ Indexing</p>
<h2>Solution Code</h2>
<pre><code class="language-python">n = int(input())
s = input()

count = 0

for i in range(n-1):
    if s[i] == s[i+1]:
        count += 1

print(count)
</code></pre>
<h2>What I learned</h2>
<ul>
<li><p>Adjacent comparison</p>
</li>
<li><p>String traversal</p>
</li>
</ul>
<hr />
<h1>9. Helpful Maths (339A)</h1>
<h2>What the problem asks</h2>
<p>Sort numbers separated by <code>+</code>.</p>
<p>Example:</p>
<p>3+2+1 → 1+2+3</p>
<h2>What I understood</h2>
<p>Split the string, sort the values, and join them.</p>
<h2>Concepts used</h2>
<p>✔ Split ✔ Sort ✔ Join</p>
<h2>Solution Code</h2>
<pre><code class="language-python">s = input()

nums = s.split("+")
nums.sort()

print("+".join(nums))
</code></pre>
<h2>What I learned</h2>
<ul>
<li><p>String splitting</p>
</li>
<li><p>Sorting</p>
</li>
<li><p>Joining strings</p>
</li>
</ul>
<hr />
<h1>10. Beautiful Matrix (263A)</h1>
<h2>What the problem asks</h2>
<p>We are given a 5×5 matrix where only one element is <code>1</code> and all others are <code>0</code>.</p>
<p>We need to move that <code>1</code> to the center position <code>(3,3)</code> using minimum moves.</p>
<p>Each move can swap adjacent rows or columns.</p>
<h2>What I understood</h2>
<p>The main task is to find where <code>1</code> is located.</p>
<p>Once found:</p>
<ul>
<li><p>calculate row distance from center</p>
</li>
<li><p>calculate column distance from center</p>
</li>
<li><p>add both distances</p>
</li>
</ul>
<p>Formula:</p>
<pre><code class="language-python">moves = abs(row - 2) + abs(col - 2)
</code></pre>
<p>(Because Python uses 0-based indexing)</p>
<h2>Concepts used</h2>
<p>✔ Nested Loops ✔ Lists ✔ Conditions ✔ Absolute Difference</p>
<h2>Solution Code</h2>
<pre><code class="language-python">for i in range(5):
    row = list(map(int, input().split()))
    
    if 1 in row:
        r = i
        c = row.index(1)

moves = abs(r - 2) + abs(c - 2)

print(moves)
</code></pre>
<h2>What I learned</h2>
<ul>
<li><p>How to work with matrices</p>
</li>
<li><p>How nested loops help traverse rows and columns</p>
</li>
<li><p>Using <code>abs()</code> to calculate minimum distance</p>
</li>
</ul>
<hr />
<h1>Conclusion</h1>
<p>These beginner problems taught me that competitive programming is not just about coding — it is about understanding the problem, finding the logic, and applying the right concepts.</p>
<p>Through these problems, I improved my understanding of:</p>
<ul>
<li><p>loops</p>
</li>
<li><p>strings</p>
</li>
<li><p>sets</p>
</li>
<li><p>lists</p>
</li>
<li><p>conditions</p>
</li>
</ul>
<p>I am continuing to solve more problems and improve my problem-solving skills step by step.</p>
<p>Next target:</p>
<p>📍 More Codeforces problems</p>
<p>📍 Better problem-solving speed</p>
<p>📍 Stronger DSA foundation</p>
]]></content:encoded></item><item><title><![CDATA[From print("Hello World") to Building Logic — My Python Learning Journey 🐍]]></title><description><![CDATA[When I first started learning Python, I thought coding was just writing lines and getting output. But slowly I realized it is actually about thinking logically and teaching the computer how to think.
]]></description><link>https://html-portfolio.hashnode.dev/my-python-learning-journey</link><guid isPermaLink="true">https://html-portfolio.hashnode.dev/my-python-learning-journey</guid><category><![CDATA[Python]]></category><category><![CDATA[Developer]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[programmer]]></category><category><![CDATA[coding]]></category><category><![CDATA[Python 3]]></category><category><![CDATA[python beginner]]></category><category><![CDATA[learning]]></category><category><![CDATA[Learning Journey]]></category><dc:creator><![CDATA[Annet]]></dc:creator><pubDate>Mon, 29 Jun 2026 18:01:26 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/4064df7b-414a-41e5-bbb0-7c44a41a9678.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When I first started learning Python, I thought coding was just writing lines and getting output. But slowly I realized it is actually about <strong>thinking logically</strong> and teaching the computer how to think.</p>
<p>This is everything I’ve learned so far, explained in the simplest way possible.</p>
<hr />
<h1>Chapter 1: Talking to the Computer</h1>
<p>The first thing I learned was:</p>
<pre><code class="language-python">print("Hello World")
</code></pre>
<p>This was my introduction to Python.</p>
<p>It taught me something very important:</p>
<p>A computer does not think on its own. It only follows the instructions we give.</p>
<p>The <code>print()</code> function is used to display output on the screen. It is the simplest way for a program to communicate with us.</p>
<p>Think of it like:</p>
<p>Me → Python → Output</p>
<p>This was the first step in understanding how programming works.</p>
<hr />
<h1>Chapter 2: Variables — Memory Boxes 📦</h1>
<p>Variables are used to store information in memory.</p>
<p>Example:</p>
<pre><code class="language-python">name = "Annet"
age = 21
</code></pre>
<p>Imagine:</p>
<p>📦 name → "Annet" 📦 age → 21</p>
<p>Here, <code>name</code> stores text and <code>age</code> stores a number.</p>
<p>Variables help us save data so we can use it later in the program.</p>
<p>This taught me that programming is not just writing code — it is about storing, managing, and using data.</p>
<hr />
<h1>Chapter 3: Data Types — Different Types of Boxes</h1>
<p>Not all data is the same.</p>
<p>Python divides data into different types:</p>
<pre><code class="language-python">x = 10        # Integer
y = 3.14      # Float
name = "Annet" # String
is_happy = True # Boolean
</code></pre>
<p>Each type has its own purpose:</p>
<ul>
<li><p>Integers for whole numbers</p>
</li>
<li><p>Floats for decimal values</p>
</li>
<li><p>Strings for text</p>
</li>
<li><p>Booleans for true or false values</p>
</li>
</ul>
<p>This taught me that understanding data types is important because different operations work differently on each type.</p>
<hr />
<h1>Chapter 4: Taking Input — Letting Users Speak 🎤</h1>
<p>Before learning input, my programs were fixed.</p>
<p>Then I learned:</p>
<pre><code class="language-python">name = input("Enter your name: ")
print(name)
</code></pre>
<p>The <code>input()</code> function allows the user to give data to the program.</p>
<p>This made my programs interactive.</p>
<p>Now the program could take different values from different users.</p>
<p>This was the first step in making my programs dynamic.</p>
<hr />
<h1>Chapter 5: Type Casting — Transforming Data 🔄</h1>
<p>Sometimes data is not in the form we need.</p>
<p>Example:</p>
<pre><code class="language-python">x = "10"
</code></pre>
<p>Here, <code>10</code> is a string, not a number.</p>
<p>To use it as a number:</p>
<pre><code class="language-python">x = int(x)
</code></pre>
<p>This converts the string into an integer.</p>
<p>Type casting helps convert data from one type to another.</p>
<p>This taught me that data must sometimes be transformed before it can be used properly.</p>
<hr />
<h1>Chapter 6: Operators — The Action Makers ⚡</h1>
<p>Operators are symbols used to perform operations.</p>
<pre><code class="language-python">+   Add
-   Subtract
*   Multiply
/   Divide
%   Remainder
</code></pre>
<p>Example:</p>
<pre><code class="language-python">a = 10
b = 5
print(a+b)
</code></pre>
<p>Operators help us manipulate data and perform calculations.</p>
<p>Without operators, variables would just hold values without doing anything useful.</p>
<hr />
<h1>Chapter 7: Decision Making — Teaching Logic 🧠</h1>
<p>This is where programming became more logical.</p>
<pre><code class="language-python">if age &gt;= 18:
    print("Eligible")
else:
    print("Not eligible")
</code></pre>
<p>The program checks a condition and decides what to do.</p>
<p>This taught me that programs can make decisions based on data.</p>
<p>Decision making is one of the most important parts of programming.</p>
<hr />
<h1>Chapter 8: Loops — Repetition Without Rewriting 🔁</h1>
<p>Sometimes we need to repeat the same task many times.</p>
<p>Instead of writing:</p>
<pre><code class="language-python">print("Hello")
print("Hello")
print("Hello")
</code></pre>
<p>We use:</p>
<pre><code class="language-python">for i in range(3):
    print("Hello")
</code></pre>
<p>Loops save time and reduce repeated code.</p>
<p>This taught me that repetition can be controlled efficiently.</p>
<hr />
<h2>Loop controls</h2>
<h3>break</h3>
<p>Stops the loop immediately.</p>
<h3>continue</h3>
<p>Skips the current iteration and moves to the next.</p>
<h3>pass</h3>
<p>Used as a placeholder when no code is written yet.</p>
<p>These help control the flow of loops.</p>
<hr />
<h1>Chapter 9: Pattern Printing — My First Real Logic Test ⭐</h1>
<p>Patterns looked simple at first.</p>
<p>But they required logic.</p>
<p>Example:</p>
<pre><code class="language-python">*
**
***
****
</code></pre>
<p>Pattern printing taught me:</p>
<ul>
<li><p>How nested loops work</p>
</li>
<li><p>How rows and columns are managed</p>
</li>
<li><p>How logic can create visual structures</p>
</li>
</ul>
<p>This improved my problem-solving skills.</p>
<hr />
<h1>Chapter 10: Strings — Playing with Text ✍️</h1>
<p>Strings are sequences of characters.</p>
<p>Example:</p>
<pre><code class="language-python">name = "Python"
</code></pre>
<p>Strings are very important because most real-world data is text.</p>
<hr />
<h2>Indexing</h2>
<p>Used to access a single character.</p>
<pre><code class="language-python">name[0]
</code></pre>
<p>Output:</p>
<pre><code class="language-python">P
</code></pre>
<hr />
<h2>Slicing</h2>
<p>Used to access part of a string.</p>
<pre><code class="language-python">name[0:3]
</code></pre>
<p>Output:</p>
<pre><code class="language-python">Pyt
</code></pre>
<hr />
<h2>Reverse</h2>
<pre><code class="language-python">name[::-1]
</code></pre>
<p>Output:</p>
<pre><code class="language-python">nohtyP
</code></pre>
<p>This taught me how text can be manipulated in different ways.</p>
<hr />
<h1>Chapter 11: Data Structures — Organizing Information 🗂️</h1>
<p>Data structures help store multiple values efficiently.</p>
<hr />
<h2>Lists</h2>
<p>Lists are ordered and mutable.</p>
<pre><code class="language-python">a = [1,2,3]
</code></pre>
<p>They can be modified:</p>
<pre><code class="language-python">a.append(4)
</code></pre>
<p>Lists taught me how to manage collections of data.</p>
<hr />
<h2>Tuples</h2>
<p>Tuples are ordered but immutable.</p>
<pre><code class="language-python">t = (1,2,3)
</code></pre>
<p>Packing:</p>
<pre><code class="language-python">t = 1,2,3
</code></pre>
<p>Unpacking:</p>
<pre><code class="language-python">a,b,c = t
</code></pre>
<p>Tuples taught me that some data should remain fixed.</p>
<hr />
<h2>Sets</h2>
<p>Sets store unique values only.</p>
<pre><code class="language-python">s = {1,2,2,3}
</code></pre>
<p>Output:</p>
<pre><code class="language-python">{1,2,3}
</code></pre>
<p>Sets automatically remove duplicates.</p>
<p>This taught me how uniqueness is handled in Python.</p>
<hr />
<h2>Dictionaries</h2>
<p>Dictionaries store data as key-value pairs.</p>
<pre><code class="language-python">student = {
    "name": "Annet",
    "age": 21
}
</code></pre>
<p>Example:</p>
<p>name → Annet</p>
<p>This taught me how data can be stored and accessed using keys.</p>
<p>Dictionaries are useful for structured information.</p>
<hr />
<h1>Chapter 12: Functions — Reusable Logic 🛠️</h1>
<p>Functions help avoid writing the same code repeatedly.</p>
<pre><code class="language-python">def add(a,b):
    return a+b
</code></pre>
<p>A function is a block of reusable code.</p>
<p>This taught me that programming should be organized and reusable.</p>
<hr />
<h2>return</h2>
<p>The <code>return</code> statement sends the result back.</p>
<p>Without <code>return</code>, the function only performs.</p>
<p>With <code>return</code>, it gives a value back.</p>
<p>This made functions much more useful.</p>
<hr />
<h2>*args and **kwargs</h2>
<p>These make functions flexible.</p>
<pre><code class="language-python">def fun(*args)
</code></pre>
<p>Used for multiple values.</p>
<pre><code class="language-python">def fun(**kwargs)
</code></pre>
<p>Used for multiple named values.</p>
<p>This taught me how functions can accept varying amounts of data.</p>
<hr />
<h2>Lambda</h2>
<p>Small one-line functions.</p>
<pre><code class="language-python">square = lambda x: x*x
</code></pre>
<p>Useful for simple operations.</p>
<hr />
<h1>Chapter 13: Recursion — Functions Calling Themselves 🔄</h1>
<p>Recursion means a function calling itself.</p>
<p>Example:</p>
<pre><code class="language-python">def fact(n):
    if n == 1:
        return 1
    return n * fact(n-1)
</code></pre>
<p>This taught me that big problems can be broken into smaller versions of the same problem.</p>
<p>Recursion improved my understanding of problem-solving.</p>
<hr />
<h1>Chapter 14: File Handling — Making Data Permanent 📁</h1>
<p>Before file handling, data disappeared after program execution.</p>
<p>Now:</p>
<pre><code class="language-python">with open("notes.txt","w") as file:
    file.write("Hello")
</code></pre>
<p>This allows data to be stored permanently.</p>
<p>File handling taught me that programs can save and read information.</p>
<hr />
<h1>Chapter 15: Exception Handling — Handling Mistakes Gracefully ⚠️</h1>
<p>Errors are normal in programming.</p>
<p>What matters is handling them properly.</p>
<pre><code class="language-python">try:
    x = 10/0
except:
    print("Error")
</code></pre>
<p>This prevents the program from crashing.</p>
<p>It taught me how to manage unexpected situations.</p>
<hr />
<h2>raise</h2>
<p>Creating my own errors:</p>
<pre><code class="language-python">raise ValueError("Invalid input")
</code></pre>
<p>This taught me that I can define and control errors based on conditions.</p>
<hr />
<h1>What I Realized</h1>
<p>Learning Python is not about memorizing syntax.</p>
<p>It is about:</p>
<ul>
<li><p>thinking clearly</p>
</li>
<li><p>breaking problems</p>
</li>
<li><p>building logic</p>
</li>
<li><p>solving step by step</p>
</li>
</ul>
<p>From a simple calculator to recursion and file handling, every topic taught me something deeper.</p>
<p>Next stop:</p>
<p>🚀 Object-Oriented Programming 🚀 Data Structures and Algorithms 🚀 Competitive Programming</p>
]]></content:encoded></item><item><title><![CDATA[How I Customized My VS Code to Boost Productivity]]></title><description><![CDATA[I have recently customised my boring looking vs code into a aesthetic cute one so that my programming would be more fun and interesting i have used many extension for my extension and i love to share ]]></description><link>https://html-portfolio.hashnode.dev/how-i-customized-my-vs-code-to-boost-productivity</link><guid isPermaLink="true">https://html-portfolio.hashnode.dev/how-i-customized-my-vs-code-to-boost-productivity</guid><category><![CDATA[VS Code]]></category><category><![CDATA[Visual Studio Code]]></category><category><![CDATA[Productivity]]></category><category><![CDATA[Developer Tools]]></category><category><![CDATA[customization]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Annet]]></dc:creator><pubDate>Sun, 14 Jun 2026 07:24:57 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/95127e6a-0db9-4eb4-8258-b8966a297915.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I have recently customised my boring looking vs code into a aesthetic cute one so that my programming would be more fun and interesting i have used many extension for my extension and i love to share my customization so that others could also able to customise their vs code based on their preferences and make their coding workspace creative and artistic</p>
<h2>Lets me explain the customization process step by step</h2>
<h2>1. Theme</h2>
<p>Initially, I was using the default VS Code theme, which felt plain and uninspiring and i really wanted to make my theme look colourfull and vibrant that's when i find multiple extensions to do it. My most favourite extensions are</p>
<ul>
<li><p><strong>haSakura-theme :</strong> A pink vibrant theme which is bright and pookie coded</p>
</li>
<li><p><strong>Shades of Purple :</strong> A professional theme with hand-picked &amp; bold shades of purple</p>
</li>
<li><p><strong>JellyFish Theme :</strong> A beautifully crafted theme designed to reduce eye strain while making code stand out clearly.</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/068847b8-0952-4eda-b0a3-fb4f52e6eb2e.png" alt="" style="display:block;margin:0 auto" />

<h2>2. Icons</h2>
<p>This are the icons used in the files in the vs code making them cute and creative make us enjoy creating new files and looking at those unique icons for different languages . Some of the icon theme that i explored while customization include</p>
<ul>
<li><p><strong>Celestial Magic Girl Icon Theme :</strong> Cute and magical icons</p>
</li>
<li><p><strong>RuneScape Icon Theme :</strong> Old School RuneScape Icon Theme</p>
</li>
<li><p><strong>Ghibli Icon Theme :</strong> Icons from ghibli movies</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/b7eccd38-2602-4401-b529-81d9186f3748.png" alt="" style="display:block;margin:0 auto" />

<h2>3. Pets</h2>
<p>This is the very surprising feature that i find while customising vs code also have extensions for choosing your won pet there a numberous pets that you can choose from. Whenever coding feels repetitive, interacting with these pets adds a bit of fun to the experience. It's toooo cute to add on your vs code. Some of the favourties are</p>
<ul>
<li><p><strong>Amber pet :</strong> A cute anime girl that gives cute reaction and makes sound</p>
</li>
<li><p><strong>vscode-pets :</strong> You can add as many pets you want and name they they will be playing with each other</p>
</li>
<li><p><strong>Pokemon Pets :</strong> Bring your favorite Pokémon into VS Code with adorable virtual companions that stay by your side while coding.</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/94dd11c7-5019-4b70-b380-5b1aa32c559b.png" alt="" style="display:block;margin:0 auto" />

<h2>4. Cursor</h2>
<p>Cursor extensions allow you to customize the appearance and behavior of your cursor. This can make you to write long lines of code without getting bored. You can choose cursor of your liked one. Some of the good one are</p>
<ul>
<li><p><strong>QuackTrack: Cute Animated Pixel Duck :</strong> A cute Duck (and his friends) next to your cursor to make debugging more enjoyable and boost your productivity!</p>
</li>
<li><p><strong>Neovide Cursor :</strong> Adds smooth cursor movement and elegant animations, bringing a polished Neovim-inspired feel to VS Code.</p>
</li>
<li><p><strong>Vision Smash Code :</strong> Add cursor trail effects, window animations, and gradient theme effects to VS Code, making your coding experience more vivid and interesting!</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/bbe68692-792d-4473-b742-6539fb6bf739.png" alt="" style="display:block;margin:0 auto" />

<h2>5.Fonts</h2>
<p>Fonts play a huge role in making the coding experience comfortable and visually appealing. A good programming font improves readability, reduces eye strain, and makes code look cleaner and more professional. Some of the fonts I explored while customizing VS Code include:</p>
<ul>
<li><p><strong>JetBrains Mono</strong> : A modern font designed specifically for developers, featuring excellent readability and programming ligatures.</p>
</li>
<li><p><strong>Fira Code</strong> : A popular coding font that combines common programming symbols into elegant ligatures, making code easier to read.</p>
</li>
<li><p><strong>Cascadia Code</strong> : Microsoft's coding font, optimized for VS Code with clear character distinctions and built-in ligatures.</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/d9002ef0-02e6-4bfe-952b-782f987e94e3.png" alt="" style="display:block;margin:0 auto" />

<h2>Final Thoughts</h2>
<p>Customizing VS Code was a lot more fun than I expected. What started as a simple attempt to make my editor look better turned into a way of creating a workspace that feels more personal and enjoyable to use every day.</p>
<p>From colorful themes and unique icon packs to virtual pets, cursor effects, and programming fonts, every small change made coding a little more exciting. While these customizations don't directly improve coding skills, they can make the development experience more comfortable and motivating.</p>
<p>My current setup is still evolving, and I'm always exploring new extensions and ideas. If you're someone who spends hours coding, I highly recommend experimenting with different customizations and creating a workspace that reflects your own personality.</p>
<p>Thank you for reading!</p>
<p>Happy coding! 🚀</p>
]]></content:encoded></item><item><title><![CDATA[My Journey Learning HTML: From Zero to Building My First Portfolio]]></title><description><![CDATA[A few days ago, I started learning HTML with the goal of building my own portfolio website. At first, web development looked overwhelming, but after practicing consistently, I realized that every webs]]></description><link>https://html-portfolio.hashnode.dev/my-journey-learning-html-from-zero-to-building-my-first-portfolio</link><guid isPermaLink="true">https://html-portfolio.hashnode.dev/my-journey-learning-html-from-zero-to-building-my-first-portfolio</guid><category><![CDATA[HTML]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[portfolio]]></category><category><![CDATA[#beginnerjourney]]></category><category><![CDATA[CSS]]></category><category><![CDATA[StudentDeveloper]]></category><category><![CDATA[Frontend Development]]></category><dc:creator><![CDATA[Annet]]></dc:creator><pubDate>Sat, 13 Jun 2026 07:16:15 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a2cd58d333ea16994909c47/245ce6b0-3252-4543-9574-8787dbde304e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A few days ago, I started learning HTML with the goal of building my own portfolio website. At first, web development looked overwhelming, but after practicing consistently, I realized that every website is built from simple building blocks.</p>
<p>What is HTML?</p>
<p>HTML (HyperText Markup Language) is the foundation of every website. It provides the structure of a webpage using elements such as headings, paragraphs, images, links, forms, and buttons.</p>
<p>Think of HTML as the skeleton of a website.</p>
<p>Topics I Learned</p>
<ol>
<li>Basic HTML Structure</li>
</ol>
<p>One of the first things I learned was the basic structure of an HTML document.</p>
<ul>
<li><p><code>&lt;html&gt;</code></p>
</li>
<li><p><code>&lt;head&gt;</code></p>
</li>
<li><p><code>&lt;title&gt;</code></p>
</li>
<li><p><code>&lt;body&gt;</code></p>
</li>
</ul>
<p>These tags form the foundation of every webpage.</p>
<h3>2. Headings and Paragraphs</h3>
<p>I learned how to display content using:</p>
<ul>
<li><p><code>&lt;h1&gt;</code> to <code>&lt;h6&gt;</code> for headings</p>
</li>
<li><p><code>&lt;p&gt;</code> for paragraphs</p>
</li>
</ul>
<p>These tags help organize information clearly.</p>
<h3>3. Links and Navigation</h3>
<p>I learned to create clickable links using:</p>
<pre><code class="language-html">&lt;a href="https://example.com"&gt;Visit Website&lt;/a&gt;
</code></pre>
<p>I also learned how to open links in a new tab using:</p>
<pre><code class="language-html">target="_blank"
</code></pre>
<h3>4. Images</h3>
<p>Displaying images was another exciting step.</p>
<pre><code class="language-html">&lt;img src="image.jpg" alt="Image"&gt;
</code></pre>
<p>I learned how to adjust image sizes and use images in my portfolio.</p>
<h3>5. Forms</h3>
<p>Forms allow users to enter information.</p>
<p>I practiced:</p>
<ul>
<li><p>Text inputs</p>
</li>
<li><p>Labels</p>
</li>
<li><p>Placeholders</p>
</li>
<li><p>Submit buttons</p>
</li>
</ul>
<p>This helped me understand how websites collect user information.</p>
<h3>6. IDs and Classes</h3>
<p>I learned the difference between IDs and classes.</p>
<ul>
<li><p>IDs are unique.</p>
</li>
<li><p>Classes can be used for multiple elements.</p>
</li>
</ul>
<p>Example:</p>
<pre><code class="language-html">&lt;p id="title"&gt;Hello&lt;/p&gt;
&lt;p class="text"&gt;Welcome&lt;/p&gt;
</code></pre>
<h3>7. CSS Styling</h3>
<p>After learning HTML, I started styling pages using CSS.</p>
<p>I explored:</p>
<ul>
<li><p>Colors</p>
</li>
<li><p>Borders</p>
</li>
<li><p>Padding</p>
</li>
<li><p>Margins</p>
</li>
<li><p>Backgrounds</p>
</li>
</ul>
<p>This transformed plain webpages into attractive designs.</p>
<h3>8. Background Images</h3>
<p>One of the most interesting things I learned was adding background images.</p>
<pre><code class="language-css">background-image: url("image.jpg");
background-size: cover;
background-position: center;
</code></pre>
<p>I also learned the purpose of:</p>
<ul>
<li><p><code>background-repeat</code></p>
</li>
<li><p><code>background-attachment</code></p>
</li>
<li><p><code>background-size</code></p>
</li>
<li><p><code>background-position</code></p>
</li>
</ul>
<h3>9. Navigation Bar</h3>
<p>I started creating a navigation bar for my portfolio with sections such as:</p>
<ul>
<li><p>About</p>
</li>
<li><p>Skills</p>
</li>
<li><p>Projects</p>
</li>
<li><p>Certifications</p>
</li>
<li><p>Education</p>
</li>
<li><p>Contact</p>
</li>
</ul>
<p>This helped me understand how real websites are organized.</p>
<h3>10. Pseudo Classes</h3>
<p>I learned CSS pseudo-classes such as:</p>
<ul>
<li><p><code>:hover</code></p>
</li>
<li><p><code>:visited</code></p>
</li>
<li><p><code>:active</code></p>
</li>
<li><p><code>:nth-child()</code></p>
</li>
</ul>
<p>These allow elements to react to user interactions.</p>
<h3>11. Positioning and Layouts</h3>
<p>I explored:</p>
<ul>
<li><p><code>float</code></p>
</li>
<li><p><code>position</code></p>
</li>
<li><p><code>relative</code></p>
</li>
<li><p><code>absolute</code></p>
</li>
<li><p><code>fixed</code></p>
</li>
<li><p><code>sticky</code></p>
</li>
</ul>
<p>These concepts helped me control where elements appear on the page.</p>
<h3>12. Challenges I Faced</h3>
<p>The most valuable part of my learning journey was applying everything to a personal portfolio website.</p>
<p>While building it, I faced many challenges:</p>
<ul>
<li><p>Elements not aligning correctly</p>
</li>
<li><p>CSS properties not working as expected</p>
</li>
<li><p>Layout issues</p>
</li>
</ul>
<p>But solving these problems taught me much more than simply watching tutorials.</p>
<h2>What I Learned Beyond HTML</h2>
<p>The biggest lesson was that learning web development is not about memorizing tags. It is about building projects, making mistakes, debugging, and improving step by step.</p>
<p>Every error taught me something new.</p>
<h2>What's Next?</h2>
<p>My next goals are:</p>
<ul>
<li><p>Improve my CSS skills</p>
</li>
<li><p>Learn Flexbox</p>
</li>
<li><p>Learn JavaScript</p>
</li>
<li><p>Make my portfolio responsive</p>
</li>
<li><p>Build more projects</p>
</li>
</ul>
<h2>My First Portfolio Website</h2>
<p>One of the most exciting parts of my learning journey was building and deploying my first portfolio website.</p>
<p>This portfolio is the first version of my work. I know it is far from perfect and may not look as professional as experienced developers' portfolios. However, I am proud of it because it represents my first step into web development and showcases the concepts I have learned so far.</p>
<p>Building this portfolio taught me valuable lessons about HTML structure, CSS styling, layouts, navigation, debugging, and deployment. More importantly, it showed me that learning happens through creating, experimenting, and improving.</p>
<p>I plan to continue refining the design, improving responsiveness, learning modern CSS techniques such as Flexbox and Grid, and adding more projects as I grow as a developer.</p>
<h3>Connect With Me</h3>
<p>🌐 Portfolio: <a href="https://annet-own-portfolio.netlify.app/">https://annet-own-portfolio.netlify.app/</a></p>
<p>💻 GitHub: <a href="https://github.com/annet2005">https://github.com/annet2005</a></p>
<p>🔗 LinkedIn:<a href="https://www.linkedin.com/in/annetraj/">https://www.linkedin.com/in/annetraj/</a></p>
<h2>Final Thoughts</h2>
<p>Starting web development can feel challenging at first, but every small step contributes to growth. Just a few days ago, I had very little understanding of how websites were built. Today, I have created and deployed my own portfolio website and gained a strong foundation in HTML and CSS.</p>
<p>This is only the beginning of my journey. I am excited to continue learning, building projects, improving my skills, and sharing my progress along the way.</p>
<p>Thank you for reading my first blog. I hope it encourages other beginners to start building and learning one step at a time.</p>
]]></content:encoded></item></channel></rss>