<?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 Eshwar Nagaraj on Medium]]></title>
        <description><![CDATA[Stories by Eshwar Nagaraj on Medium]]></description>
        <link>https://medium.com/@eshwar.nagaraj9?source=rss-8e56a51723ee------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*635QP8rgQD6OOOwl950obg.jpeg</url>
            <title>Stories by Eshwar Nagaraj on Medium</title>
            <link>https://medium.com/@eshwar.nagaraj9?source=rss-8e56a51723ee------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 20:31:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@eshwar.nagaraj9/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[Why We Started OneDayCoder?]]></title>
            <link>https://medium.com/@eshwar.nagaraj9/why-we-started-onedaycoder-535f99ac6895?source=rss-8e56a51723ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/535f99ac6895</guid>
            <category><![CDATA[one-day-coder]]></category>
            <category><![CDATA[course]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[grappltech]]></category>
            <dc:creator><![CDATA[Eshwar Nagaraj]]></dc:creator>
            <pubDate>Mon, 28 Jul 2025 15:46:27 GMT</pubDate>
            <atom:updated>2025-07-28T15:46:27.928Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Turning urgent need into instant learning. One day at a time.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g5LdiU0GchaXFC0AmVUqzA.png" /></figure><p>It all began with a single insight — not from data, not from trends, but from conversations.</p><p>At <strong>GrapplTech</strong>, we noticed a recurring pattern. Every time we released a coding course, there was a particular group of learners who kept asking one question:</p><p><strong>“Is there a one-day crash course version of this?”</strong></p><p>At first, we thought it was just a preference. But as we dug deeper, we realized it was <strong>a desperate need</strong>.</p><p>These weren’t casual learners. These were <strong>college students juggling labs, assignments, hackathons, and placement prep — all at once.</strong> They weren’t short on ambition — they were short on time. The system was demanding everything from them, but offering very little room for quick, focused upskilling.</p><p>And that’s when the idea of <strong>OneDayCoder</strong> was born.</p><h3><strong>The Spark: Learning in a Day</strong></h3><p>We envisioned a platform built for speed and depth — crash courses that truly deliver. Not superficial theory dumps, but well-structured, to-the-point tutorials that can help you revise or learn something useful in just a few hours.</p><p>Because, let’s face it, not everyone has the luxury of time, and everyone deserves the opportunity to learn and grow.</p><h3>More Than Just Courses: Building the OneDay Ecosystem</h3><p>But we didn’t stop with classes.</p><p>What if we could provide the entire toolkit for career advancement in one place?</p><p>This is why we are working on:</p><p>🎯<strong> Free Resume Analyzer.</strong><br> A program that not only checks grammar, but also aligns your CV with your ideal job.</p><p>🤖 <strong>AI mock interview tool</strong><br> Get real-time, on-the-spot coding and behavioral interview simulations based on your experience level.</p><p>👨‍🏫 <strong>AI Student Mentor</strong><br> Your go-to code buddy, placement coach, and roadmap guide in one.</p><p>These are not just concepts. They are currently in progress, and some will be available sooner than you think.</p><h3>We’ve Launched Our MVP 💻</h3><p>Today, we’re proud to say that <strong>OneDayCoder’s MVP is live.</strong> This is our way of testing <strong>market fit</strong>, learning from our early users, and evolving with every piece of feedback.</p><p>It’s not perfect yet. But it’s <strong>real, raw, and running</strong>.</p><p>And we’re just getting started.</p><h3>The Dream: OneDay at a Time</h3><p>We’re not just building another ed-tech tool.</p><p>We’re building a <strong>movement</strong> — for students who hustle hard, for learners who have 24 hours to turn things around, and for dreamers who believe that one day <em>can</em> change everything.</p><p>If that sounds like you, we’d love you to be a part of our story.</p><p>💬 Join our community.<br> 🚀 Use our MVP and tell us what’s missing.<br> 🤝 Collaborate if you’re building in the same space.</p><p>Let’s make something <em>massive</em> together.</p><blockquote>Because sometimes, <strong>all it takes is one day. — Team OneDayCoder</strong><br> Build Fast. Learn Faster.</blockquote><p>Visit our website using <a href="https://www.onedaycoder.in/">www.onedaycoder.in</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=535f99ac6895" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Queues in Data Structures and Algorithms]]></title>
            <link>https://medium.com/@eshwar.nagaraj9/queues-in-data-structures-and-algorithms-340dd3e35e49?source=rss-8e56a51723ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/340dd3e35e49</guid>
            <category><![CDATA[queues-using-linked-list]]></category>
            <category><![CDATA[queue]]></category>
            <category><![CDATA[dsa-training]]></category>
            <category><![CDATA[dsa-courses]]></category>
            <dc:creator><![CDATA[Eshwar Nagaraj]]></dc:creator>
            <pubDate>Thu, 10 Jul 2025 10:01:56 GMT</pubDate>
            <atom:updated>2025-07-10T10:01:56.895Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k851KplYq_1FNaF_7BGuqQ.png" /></figure><h3><strong>Queue Introduction:</strong></h3><h3>🧠 What is a Queue in Real Life?</h3><p>Think of a queue like a line of people at a movie theater or coffee shop.</p><ul><li>The person who <strong>comes first</strong> is <strong>served first</strong> (this is called <strong>FIFO</strong> — First In, First Out).</li><li>New people join at the <strong>end</strong> of the line.</li><li>People leave only from the <strong>front</strong>.</li></ul><h3>🧱 What Did We Build in Code?</h3><p>We built this queue using two custom things:</p><ol><li><strong>Nodes</strong> — Each person in the line.</li><li><strong>Queue class</strong> — The manager of the line that handles adding and removing people.</li></ol><h3>🔍 Breakdown of the Code</h3><h4>✅ class Node</h4><p>This is a tiny box that stores:</p><ul><li>A number (like a name tag or ID).</li><li>A pointer to the next person (next node in the line).</li></ul><p>Whenever a new person comes in (a number in our case), we store their number and set their pointer to NULL because, at first, they’re not connected to anyone else.</p><h4>✅ class Queue</h4><p>This is where the main queue lives. It has:</p><ul><li>front: Who&#39;s standing at the front of the line.</li><li>rear: Who’s the last person in the line.</li></ul><p>🔹 enqueue(int value)</p><p>This is used to <strong>add someone</strong> to the end of the line.</p><ul><li>If the queue is empty (rear == NULL), we make the first person both the front and the rear.</li><li>Otherwise, we attach the new person to the end (rear-&gt;next) and move the rear pointer to them.</li></ul><p>🔹 dequeue()</p><p>This is to <strong>remove the person at the front</strong> of the line.</p><ul><li>If no one is in the line, we just print a message.</li><li>If there’s someone, we remove the front person and move the front pointer to the next person.</li><li>If the queue becomes empty after removing, we set rear = NULL as well.</li></ul><p>🔹 peek()</p><p>This shows us who is standing at the front <strong>without removing</strong> them.<br> If the queue is empty, it tells us that.</p><p>🔹 isEmpty()</p><p>Just a simple check: “Is anyone in the line?”</p><p>🔹 display()</p><p>This goes through the line and prints out everyone’s number, like showing the full queue.</p><p>🔹 ~Queue() (Destructor)</p><p>When we’re done with the queue (like closing the app), we clean up all the people (nodes) from memory, so nothing is left behind.</p><h3>🚀 In main()</h3><p>We test the queue:</p><ol><li>Add 10, 20, 30 → Now the line is: 10 → 20 → 30</li><li>Remove 1 → Now it’s: 20 → 30</li><li>Show who’s in front → It shows 20</li><li>Remove everyone and try to remove again → It warns us the queue is empty.</li></ol><h3>🧾 Summary</h3><ul><li>The queue behaves like a normal line.</li><li>You can add to the back, remove from the front.</li><li>We used a linked list (connected nodes) to build this line.</li><li>We used <strong>classes</strong> and NULL, as you wanted.</li></ul><h3>Implementation of Queue using LinkedLists:</h3><pre>#include &lt;iostream&gt;<br>using namespace std;<br><br>// Node class<br>class Node {<br>public:<br>    int data;<br>    Node* next;<br><br>    Node(int value) {<br>        data = value;<br>        next = NULL;<br>    }<br>};<br><br>// Queue class<br>class Queue {<br>private:<br>    Node* front;<br>    Node* rear;<br><br>public:<br>    Queue() {<br>        front = NULL;<br>        rear = NULL;<br>    }<br><br>    // Enqueue operation<br>    void enqueue(int value) {<br>        Node* newNode = new Node(value);<br>        if (rear == NULL) {<br>            front = rear = newNode;<br>            return;<br>        }<br>        rear-&gt;next = newNode;<br>        rear = newNode;<br>    }<br><br>    // Dequeue operation<br>    void dequeue() {<br>        if (front == NULL) {<br>            cout &lt;&lt; &quot;Queue is empty! Cannot dequeue.&quot; &lt;&lt; endl;<br>            return;<br>        }<br>        Node* temp = front;<br>        front = front-&gt;next;<br><br>        // If front becomes NULL, set rear to NULL<br>        if (front == NULL)<br>            rear = NULL;<br><br>        delete temp;<br>    }<br><br>    // Peek operation<br>    int peek() {<br>        if (front == NULL) {<br>            cout &lt;&lt; &quot;Queue is empty!&quot; &lt;&lt; endl;<br>            return -1;<br>        }<br>        return front-&gt;data;<br>    }<br><br>    // Check if queue is empty<br>    bool isEmpty() {<br>        return front == NULL;<br>    }<br><br>    // Display queue<br>    void display() {<br>        if (front == NULL) {<br>            cout &lt;&lt; &quot;Queue is empty!&quot; &lt;&lt; endl;<br>            return;<br>        }<br>        Node* temp = front;<br>        while (temp != NULL) {<br>            cout &lt;&lt; temp-&gt;data &lt;&lt; &quot; &quot;;<br>            temp = temp-&gt;next;<br>        }<br>        cout &lt;&lt; endl;<br>    }<br><br>    // Destructor to free memory<br>    ~Queue() {<br>        while (front != NULL) {<br>            Node* temp = front;<br>            front = front-&gt;next;<br>            delete temp;<br>        }<br>    }<br>};<br><br>// Example usage<br>int main() {<br>    Queue q;<br>    q.enqueue(10);<br>    q.enqueue(20);<br>    q.enqueue(30);<br>    q.display();       // Output: 10 20 30<br><br>    q.dequeue();<br>    q.display();       // Output: 20 30<br><br>    cout &lt;&lt; &quot;Front: &quot; &lt;&lt; q.peek() &lt;&lt; endl; // Output: Front: 20<br><br>    q.dequeue();<br>    q.dequeue();<br>    q.dequeue();       // Output: Queue is empty! Cannot dequeue.<br><br>    return 0;<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=340dd3e35e49" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stack Problems]]></title>
            <link>https://medium.com/@eshwar.nagaraj9/stack-problems-298b644ce504?source=rss-8e56a51723ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/298b644ce504</guid>
            <category><![CDATA[dsa-problem]]></category>
            <category><![CDATA[dsa-training]]></category>
            <category><![CDATA[valid-parentheses]]></category>
            <category><![CDATA[stacks-queues]]></category>
            <category><![CDATA[dsa-courses]]></category>
            <dc:creator><![CDATA[Eshwar Nagaraj]]></dc:creator>
            <pubDate>Wed, 09 Jul 2025 08:22:53 GMT</pubDate>
            <atom:updated>2025-07-09T08:22:53.316Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C1-GAXrOPVIy_0i1EbMeEQ.png" /></figure><h4><strong>Easy Problems:</strong></h4><h3><strong>Problem 1: Valid Parenthesis (Leetcode 20)</strong></h3><p>Alright, buckle up! We’re diving into the world of <strong>brackets</strong>, where ( wants to end up with ), and { is desperately looking for its soulmate }. And if they don’t find each other properly? Boom 💥—invalid!</p><p>Let’s break down this code in the most <strong>clear</strong>, and a bit <strong>funny</strong> way possible.</p><h3>👨‍🏫 What does the code do?</h3><p>It checks if a string made of brackets is <strong>balanced</strong> and <strong>valid</strong>. For example:</p><ul><li>()[]{}{} ✅ Valid</li><li>([)] ❌ Invalid</li><li>((() ❌ Invalid</li></ul><h3>🧠 Pseudocode (a.k.a. the story in plain English)</h3><ol><li>Take an empty bag (stack) to keep track of opening brackets.</li><li>For every character in the string:</li></ol><ul><li>If it’s an opening bracket like ( or { or [, just throw it into the bag.</li><li>If it’s a closing bracket like ) or } or ]:</li><li>Check if the bag is not empty (you can’t close something that wasn’t opened).</li><li>Peek into the bag (check the last opened bracket).</li><li>If it matches, remove it (Yay! They matched!).</li><li>If it doesn’t match, return false (Mismatch!).</li></ul><ol><li>After checking everything, if the bag is empty — return true (all brackets were matched properly).</li><li>If something is left in the bag — return false (someone didn’t get a pair).</li></ol><h3>🪜 Step-by-Step Dry Run Example: &quot;()[{}]&quot;</h3><ol><li>( → push</li><li>) → matches top ( → pop</li><li>[ → push</li><li>{ → push</li><li>} → matches top { → pop</li><li>] → matches top [ → pop</li><li>Stack empty → ✅ Valid!</li></ol><h3>💡 Tricks &amp; Tips:</h3><ul><li><strong>Stacks are perfect for problems with “Last In, First Out” (LIFO)</strong> logic. That’s why we use it here!</li><li>Whenever you open something, just imagine you’re putting it on top of a stack.</li><li>When closing something, you have to close <strong>the last thing</strong> you opened first — like nested Tupperware boxes 🥡.</li><li>If at the end, your stack is empty, congratulations! Everything was properly closed.</li><li>A common mistake: mismatching brackets (e.g., trying to close [ with )).</li></ul><h3>🧮 Time and Space Complexity</h3><p><strong>Time Complexity (TC):</strong> O(n)<br> We traverse the string once.</p><p><strong>Space Complexity (SC):</strong> O(n)<br> In the worst case (like &quot;(((([[[{{{&quot;), all characters go into the stack.</p><h3>🧰 Technique Used</h3><p><strong>🔁 Stack-based Validation</strong></p><p>Why Stack?</p><ul><li>We need to know the <strong>last opened bracket</strong> every time we see a closing one.</li><li>Stack gives you instant access to the top element (which is exactly what we need).</li></ul><h3>🔄 Other Ways To Solve It (Just technique names):</h3><ol><li><strong>Using a Hash Map + Stack</strong> (to make it cleaner with mappings)</li><li><strong>Recursive Approach</strong> (rarely used here, but possible)</li><li><strong>Two-pointer approach</strong> (not suitable here, but some try clever hacks)</li><li><strong>Regex (pattern matching)</strong> (not recommended — very hacky for this problem)</li><li><strong>Counter-based (Not for all bracket types)</strong> — works for single bracket type only</li></ol><h3>🤹 Bonus Fun Thought:</h3><p>If you ever forget your wallet (like forgetting to close a {), your whole day is ruined. Same goes here — forget to close a bracket, and your code throws a tantrum. 😅</p><pre>class Solution {<br>public:<br>    bool isValid(string s) {<br>        stack&lt;char&gt; st;<br>        for(int i = 0; i &lt; s.length(); i++){<br>            char ch = s[i];<br>            if((ch == &#39;(&#39;) || (ch == &#39;{&#39;) || (ch == &#39;[&#39;)){<br>                st.push(ch);<br>            }else{<br>                if(!st.empty()){<br>                    char tp = st.top();<br>                    if((ch == &#39;)&#39; &amp;&amp; tp == &#39;(&#39;) || (ch == &#39;}&#39; &amp;&amp; tp == &#39;{&#39;) || (ch == &#39;]&#39; &amp;&amp; tp == &#39;[&#39;)){<br>                        st.pop();<br>                    }else{<br>                        return false;<br>                    }<br>                }else{<br>                    return false;<br>                }<br>            }<br>        }<br>        if(st.empty()){<br>                return true;<br>            }else{<br>                return false;<br>            }<br>    }<br>};</pre><h4>Hard Problems</h4><h3><strong>Problem 1: Long Valid Parenthesis (Leetcode 32)</strong></h3><p>Alright! Let’s decode the mystery of matching parentheses again — but this time, we’re not just checking if the string is valid…<br> We’re hunting for the <strong>longest valid substring</strong> of parentheses.<br> Like, &quot;(()&quot;? Nah, just 2 are valid.<br> But &quot;()(()))()&quot;? That sweet (()))() has a valid streak of <strong>6</strong>!</p><pre>class Solution {<br>public:<br>    int longestValidParentheses(string s) {<br>        stack&lt;int&gt; st;<br>        st.push(-1);<br>        int max_len = 0;<br><br>        for (int i = 0; i &lt; s.length(); i++) {<br>            if (s[i] == &#39;(&#39;) {<br>                st.push(i);<br>            } else {<br>                st.pop();<br>                if (st.empty()) {<br>                    st.push(i);<br>                } else {<br>                    max_len = max(max_len, i - st.top());<br>                }<br>            }<br>        }<br><br>        return max_len;<br>    }<br>};</pre><h3>🔍 What does this code do?</h3><p>It finds the <strong>length of the longest valid (well-formed) parentheses substring</strong> using <strong>stack magic</strong> 🧙‍♂️.</p><h3>🧠 Pseudocode (Plain English Version)</h3><ol><li>Start with a stack to track indices, not characters.</li><li>Push -1 as a base (like a reference point).</li><li>For each character in the string:</li></ol><ul><li>If it’s &#39;(&#39;, push its index into the stack.</li><li>If it’s &#39;)&#39;:</li><li>Pop the top element (we’re trying to find a match for this &#39;)&#39;)</li><li>If the stack becomes empty after popping, push the current index (new base).</li><li>If not empty, calculate the valid length: i - st.top(), and update the max length.</li></ul><p>4. After loop ends, return max_len.</p><h3>🎯 Step-by-Step Example: &quot;(()())&quot;</h3><pre>Initial stack: [-1]<br>i=0, &#39;(&#39;: push → [-1, 0]<br>i=1, &#39;(&#39;: push → [-1, 0, 1]<br>i=2, &#39;)&#39;: pop → [-1, 0], max_len = 2 (2 - 0)<br>i=3, &#39;(&#39;: push → [-1, 0, 3]<br>i=4, &#39;)&#39;: pop → [-1, 0], max_len = 4 (4 - 0)<br>i=5, &#39;)&#39;: pop → [-1], max_len = 6 (5 - (-1))</pre><p>✅ Final answer: 6</p><h3>🧮 Time &amp; Space Complexity</h3><ul><li><strong>Time Complexity:</strong> O(n) — We go through the string only once.</li><li><strong>Space Complexity:</strong> O(n) — In worst case, we push all indices to stack (for many &#39;(&#39;s).</li></ul><h3>🧰 Technique Used: Stack + Index Tracking</h3><h3>🔍 Why not just store characters?</h3><p>Because we need to <strong>calculate lengths</strong>, and for that, we need to know <strong>positions</strong>.<br> If you just store &#39;(&#39;, how do you calculate how far apart matching pairs are?<br> Hence, store <strong>indices</strong>.</p><h3>💡 Tips &amp; Tricks</h3><ul><li>Always push -1 first! It acts as a <strong>fake open bracket</strong> at the start. Without it, you’d get wrong lengths.</li><li>When you hit a &#39;)&#39;, always pop first. You&#39;re trying to close something.</li><li>If the stack is empty after popping, push the index of the &#39;)&#39; — it acts as a new base for future calculations.</li><li>max_len = max(max_len, i - st.top()) is the key calculation: difference between current index and <strong>last unmatched open</strong>.</li></ul><h3>😎 Human Analogy</h3><p>Think of ( as opening a room door, and ) as closing it.<br> You walk through a hallway with many rooms.<br> Every time you properly <strong>open and close</strong>, you mark how long that clean stretch was.<br> If you close a door without opening it first (unmatched )), you stumble and say, “Let me start counting from here again.”</p><h3>🛠️ Other Techniques to Solve This</h3><ol><li><strong>Two-pass scan with counters</strong></li></ol><ul><li>Forward and backward traversal using left and right counters</li><li>No stack used, more space-efficient.</li></ul><p><strong>2. Dynamic Programming (DP)</strong></p><ul><li>Store at each index the length of the longest valid parentheses ending there.</li></ul><p><strong>3. Greedy + Two Pointers</strong></p><ul><li>Similar to counter method but more optimized for space and faster checks.</li></ul><h3>🤯 Bonus Trick: Why Push -1?</h3><p>Without it, when you pop the first unmatched (, your stack becomes empty — and then you get wrong calculations like i - ???.</p><p>By pushing -1, you&#39;re giving it a <strong>safe ground to fall back to</strong>, like a safety net. 🕸️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=298b644ce504" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>