<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mayank Rishi on Medium]]></title>
        <description><![CDATA[Stories by Mayank Rishi on Medium]]></description>
        <link>https://medium.com/@mayankrishi59?source=rss-4ce174020101------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*OXdM762DWFz5GXsR</url>
            <title>Stories by Mayank Rishi on Medium</title>
            <link>https://medium.com/@mayankrishi59?source=rss-4ce174020101------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 15:03:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mayankrishi59/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Linked List Guide I Wish Someone Gave Me When I Started DSA !!]]></title>
            <link>https://medium.com/@mayankrishi59/the-linked-list-guide-i-wish-someone-gave-me-when-i-started-dsa-2db5869e8d8f?source=rss-4ce174020101------2</link>
            <guid isPermaLink="false">https://medium.com/p/2db5869e8d8f</guid>
            <category><![CDATA[sad]]></category>
            <category><![CDATA[linnkedlist]]></category>
            <category><![CDATA[arraylist-vs-linkedlist]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[concept]]></category>
            <dc:creator><![CDATA[Mayank Rishi]]></dc:creator>
            <pubDate>Fri, 20 Feb 2026 17:20:48 GMT</pubDate>
            <atom:updated>2026-02-20T17:20:48.091Z</atom:updated>
            <content:encoded><![CDATA[<p>When I first started learning Data Structures and Algorithms, arrays felt comfortable. Everything was clean. Indexed. Predictable.</p><p>Then I met Linked Lists. Suddenly:</p><ul><li>No indexing</li><li>No fixed size</li><li>Just nodes pointing to other nodes</li><li>And one small mistake could break the whole structure</li></ul><p>If you’ve ever felt that confusion — this blog is for you.</p><h3>First, What Is a Linked List?</h3><p>A <strong>Linked List</strong> is a linear data structure made up of <strong>nodes</strong>.</p><p>Each node contains:</p><ul><li>Data</li><li>A reference (pointer) to the next node</li></ul><p>Unlike arrays:</p><ul><li>Memory is not stored continuously</li><li>Size is dynamic</li><li>Insertions and deletions are easier (especially in the middle)</li></ul><p>Think of it like a treasure hunt.Each clue tells you where to find the next one.</p><h3><strong>1️⃣ Singly Linked List (SLL)</strong></h3><p>This is the simplest form of a Linked List.</p><p>Each node has:</p><ul><li>data</li><li>next</li></ul><p>The last node points to NULL.</p><p>How It Looks Conceptually : [10 | *] → [20 | *] → [30 | NULL]</p><p>Time Complexity</p><ul><li>Insert at beginning → O(1)</li><li>Insert at end → O(n)</li><li>Delete → O(n)</li><li>Search → O(n)</li></ul><h3><strong>2️⃣ Doubly Linked List (DLL)</strong></h3><p>Now things get more interesting.</p><p>Each node contains:</p><ul><li>data</li><li>next</li><li>prev</li></ul><p>So you can move:</p><ul><li>Forward</li><li>Backward</li></ul><p>Structure : NULL ← [10] ⇄ [20] ⇄ [30] → NULL</p><h3>Why Is It Useful?</h3><ul><li>Easy backward traversal</li><li>Easier deletion when you already have the node reference</li><li>Used in browser history (back and forward)</li></ul><p>Tradeoff : Extra memory is required because of the additional prev pointer.</p><h3>3️⃣ Circular Linked List (CLL)</h3><p>Here’s where things start looping.</p><p>In a Circular Linked List:</p><ul><li>The last node points back to the head</li><li>There is no NULL</li></ul><p>Structure : [10] → [20] → [30]<br>Why Does This Exist?</p><p>Because some systems naturally loop.</p><p>Real-world examples:</p><ul><li>Round-robin CPU scheduling</li><li>Multiplayer turn-based games</li><li>Music playlist in loop mod</li></ul><h3>4️⃣ Circular Doubly Linked List</h3><p>This is the combination of:</p><ul><li>Doubly Linked List</li><li>Circular behavior</li></ul><p>Each node has:</p><ul><li>next</li><li>prev</li></ul><p>And:</p><ul><li>Last node connects to first</li><li>First connects back to last</li></ul><p>Structure : ⇄ [10] ⇄ [20] ⇄ [30] ⇄<br>Where Is It Used?</p><ul><li>Advanced caching systems</li><li>Undo/Redo operations</li><li>Complex navigation systems</li></ul><p>It gives flexibility but uses more memory.</p><h3>The Biggest Mistake Beginners Make</h3><p>Trying to memorize instead of visualizing.</p><p>Linked Lists are about connections.</p><p>If you can clearly imagine:</p><ul><li>What each pointer is doing</li><li>Where it’s pointing</li><li>What changes during insertion or deletion</li></ul><p>You’ll never struggle with them again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2db5869e8d8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>