<?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 Rohit Kumar Yadav on Medium]]></title>
        <description><![CDATA[Stories by Rohit Kumar Yadav on Medium]]></description>
        <link>https://medium.com/@GeniRohit?source=rss-4bd2d862a0af------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*6et-ghLGjiJaG3n7</url>
            <title>Stories by Rohit Kumar Yadav on Medium</title>
            <link>https://medium.com/@GeniRohit?source=rss-4bd2d862a0af------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 14:51:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@GeniRohit/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 500 LeetCode Problems Changed My Life]]></title>
            <link>https://medium.com/@GeniRohit/why-500-leetcode-problems-changed-my-life-ab21526d8f56?source=rss-4bd2d862a0af------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab21526d8f56</guid>
            <category><![CDATA[leetcode]]></category>
            <dc:creator><![CDATA[Rohit Kumar Yadav]]></dc:creator>
            <pubDate>Wed, 09 Oct 2024 19:27:40 GMT</pubDate>
            <atom:updated>2024-10-09T19:27:40.922Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I Prepared for DSA and Secured a Role at Microsoft</h3><p>·</p><p>·</p><p>·</p><p>If you are a developer, we all know how vital Data Structures and Algorithms (DSA) are for cracking the first round of interviews for almost 90% of the companies hiring out there, and I want to quote a very famous saying which I think applies to DSA</p><blockquote><em>“love it or hate it but you can’t ignore it”</em></blockquote><p>I’m sharing my journey of preparing for DSA interviews for companies like Microsoft and other big companies while working despite not preparing for DSA interviews for the past four years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*lxcOy3sNKdpKpKHt.jpeg" /></figure><p>profile</p><h3>Initial Story</h3><p>Towards the end of 2023, I finally decided to switch jobs. The next day, I updated my resume and LinkedIn profile to let recruiters know I was open to new opportunities. To my surprise, a Google recruiter reached out to me the following day about an interview, and she told me the first round would be a DSA round.</p><p>I knew I wasn’t ready for a Google-like DSA interview, so I told the recruiter that I needed time to prepare and would schedule the interview when I was ready.</p><h3>Creating a Plan</h3><p>When it comes to coding interviews, we all know <a href="https://leetcode.com/">LeetCode</a> is the go-to platform for practicing DSA. So, I did just that — I logged into my LeetCode account after years and realized I had only solved 50 problems! The last time I switched jobs, I relied more on <a href="https://www.geeksforgeeks.org/">GeeksforGeeks</a> than LeetCode.</p><p>After doing some thorough research, I made a list of the topics I needed to focus on for my interviews.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/0*D2IiBcwJSVNEMGK6.png" /></figure><p>My notes.</p><h3>Different Phases of my preparation</h3><p>I wanted to keep realistic goals for my preparation as I was already working for a startup and as Senior Engineer there were lot of things on my plate but the goal was to solve easy problems in 15mins, medium problems in 20mins and hard problems in 40–50mins.</p><h3>1. Initial Struggles</h3><p>In the first two months, I focused on covering the basics, starting with easy topics like Arrays, LinkedLists, Stack, Queue and Heaps.</p><p>I tried to dedicate 9 PM to 12 AM solely to interview preparation after my office work. For each topic, I began with easy problems, then gradually moved to medium ones. I prioritized quality over quantity and concentrated on identifying patterns in each problem, diligently noting them down.</p><p>As I moved to medium problems, there were days I spent over 4 hours on a single problem, feeling stuck. However, I soon adopted a structured approach: I focused on understanding the problem first, using pen and paper to map out the logic before writing any code. Writing code was the easy part — getting the logic right was the challenge. I chose Java as my primary language for coding.</p><p>If I was stuck on a problem for more than an hour, I’d check the hints and attempt to solve it again. If I still couldn’t figure it out, I’d read the editorial or discussions to grasp the logic but ensured I wrote the code myself. I also bookmarked difficult questions, adding comments to remind myself where I got stuck and so it will help me revising in future.</p><h3>2. Momentum and Growth</h3><p>After 2 months, I was genuinely excited to come home and solve leet code problems.</p><p>To maintain consistency, I began solving the leetcode daily question to keep my streak. I also started participating in bi-weekly and weekly contests, which not only pushed my limits but also prepared me to solve questions in limited time simulating interview environment</p><p>By this time, I had moved on to more difficult topics like Dynamic Programming (DP), Graphs, Tries, and Backtracking. My progress was showing — I could now solve medium problems within 30 minutes and even managed to crack a few hard problems as well. This phase felt rewarding, and I could see the growth in my problem-solving skills.</p><h3>3. Gearing Up for Interviews</h3><p>After the first few months of preparation, I felt confident enough to start interviewing with mid-sized companies. Though I faced rejections initially, these early experiences, along with a few mock interviews, helped me refine my approach to problem-solving and master interview techniques.</p><p>This process boosted my confidence, and I simultaneously began preparing for low-level (LLD) and high-level design (HLD) interviews.</p><p>During this time, I also worked through Leetcode’s t<a href="https://leetcode.com/studyplan/top-interview-150/">op Interview 150</a> problems. Before each interview, I would solve previously asked questions from the company, and I found that 50–60% of the time, similar questions or patterns would come up.</p><p>When I finally cracked Microsoft, it felt like all the hard work had paid off.</p><h3>Tips for DSA preparation</h3><ul><li><strong>Consistency is Key</strong>: It may sound cliche, but consistency is the real game-changer when it comes to DSA. Some people learn faster, while others take more time, but if you stay consistent, you’ll eventually catch up. The key is to show up and keep going.</li><li><strong>Focus on Patterns</strong>: Rather than trying to solve every problem, focus on recognizing patterns in each one. Once you are confident in a specific pattern, move on to other types of problems that follow a different approach. This will help you build a strong foundation.</li><li><strong>Celebrate Small Wins</strong>: Set realistic goals when starting out. For instance, aim to solve three problems every day for a week. Once you achieve that, take a moment to acknowledge your progress. Every small win count, and you deserve to celebrate it.</li><li><strong>Don’t Compare, Believe in Yourself</strong>: There will always be someone out there who seems better, but that’s not something you can control. What you <em>can</em> control is comparing yourself to your past self and striving to improve by 1% each day. Trust your own journey.</li></ul><p>This is a personal story I’ve been wanting to share for a long time. While I plan to write more tech articles in the future, this has been on my mind for a while, so I decided to share it with you all.</p><p>Since joining my current role, I’ve moved away from my daily leetcode practice, but I’m planning to pick it up again soon. As anyone familiar with DSA knows, once you’re out of practice, it takes time to regain the same speed and efficiency.</p><p>If you’re interested, you can also check out my Microsoft interview experience here:</p><p><a href="https://medium.com/@surabhigupta2442/my-interview-experience-at-microsoft-sde-2-offer-may-2024-2bc5568903e1">My Interview Experience at Microsoft [SDE-2 Offer- May 2024] | by Surabhi Gupta | Sep, 2024 | Medium</a></p><p><a href="https://medium.com/tag/coding?source=post_page-----3b4d5b366508--------------------------------">Coding</a></p><p><a href="https://medium.com/tag/programming?source=post_page-----3b4d5b366508--------------------------------">Programming</a></p><p><a href="https://medium.com/tag/software-engineering?source=post_page-----3b4d5b366508--------------------------------">Software Engineering</a></p><p><a href="https://medium.com/tag/technology?source=post_page-----3b4d5b366508--------------------------------">Technology</a></p><p><a href="https://medium.com/tag/software-development?source=post_page-----3b4d5b366508--------------------------------">Software Development</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab21526d8f56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demystifying GPT: A Deep Dive into the Architecture of Modern AI]]></title>
            <link>https://medium.com/@GeniRohit/demystifying-gpt-a-deep-dive-into-the-architecture-of-modern-ai-8a002e5df348?source=rss-4bd2d862a0af------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a002e5df348</guid>
            <dc:creator><![CDATA[Rohit Kumar Yadav]]></dc:creator>
            <pubDate>Wed, 09 Oct 2024 19:23:04 GMT</pubDate>
            <atom:updated>2024-10-09T19:23:04.337Z</atom:updated>
            <content:encoded><![CDATA[<p>Rohit kumar yadav</p><h3>Understanding GPT: The Basics</h3><p>GPT stands for Generative Pretrained Transformer. Here’s what that means:</p><ul><li><strong>Generative</strong>: It can produce fresh, creative writing.</li><li><strong>Pretrained</strong>: It’s trained on a vast amount of data before being fine-tuned for specific tasks.</li><li><strong>Transformer</strong>: A particular type of neural network design known as a transformer is used.</li></ul><h3>The GPT Architecture: A Step-by-Step Breakdown</h3><h3>1. Input Layer</h3><p>The journey begins with the input layer, which processes the text in three steps:</p><p>a) <strong>Tokenization</strong>: The input text is broken down into tokens (words or subwords).</p><p>b) <strong>Embedding</strong>: Each token is converted into a vector (a list of numbers).</p><p>c) <strong>Positional Encoding</strong>: Information about the position of each token in the sequence is added to its vector.</p><h3>2. Transformer Blocks</h3><h3>Understanding GPT: The Basics</h3><p>GPT stands for Generative Pretrained Transformer. Here’s what that means:</p><ul><li><strong>Generative</strong>: It can produce fresh, creative writing.</li><li><strong>Pretrained</strong>: It’s trained on a vast amount of data before being fine-tuned for specific tasks.</li><li><strong>Transformer</strong>: A particular type of neural network design known as a transformer is used.</li></ul><h3>The GPT Architecture: A Step-by-Step Breakdown</h3><h3>1. Input Layer</h3><p>The journey begins with the input layer, which processes the text in three steps:</p><p>a) <strong>Tokenization</strong>: The input text is broken down into tokens (words or subwords).</p><p>b) <strong>Embedding</strong>: Each token is converted into a vector (a list of numbers).</p><p>c) <strong>Positional Encoding</strong>: Information about the position of each token in the sequence is added to its vector.</p><h3>2. Transformer Blocks</h3><p>The heart of GPT lies in its transformer blocks. These are repeated multiple times (N times) in the architecture. Each block contains:</p><p>a) <strong>Multi-Head Self-Attention Layer</strong>:</p><ul><li>This allows tokens to ‘pay attention’ to other tokens in the input.</li><li>Multiple ‘heads’ capture different types of relationships between tokens.</li><li>It uses alternating dense and sparse attention patterns for efficiency.</li></ul><p>b) <strong>Layer Normalization</strong>:</p><ul><li>Normalizes the outputs for stability.</li><li>Helps accelerate training and improve model performance.</li></ul><p>c) <strong>Feedforward Neural Network</strong>:</p><ul><li>Processes information from the attention layer.</li><li>Consists of two linear transformations with a ReLU activation in between.</li><li>Adds non-linearity, allowing the model to learn more complex functions.</li></ul><p>d) <strong>Another Layer Normalization</strong>:</p><ul><li>Ensures stable and consistent training.</li><li>Helps prevent internal covariate shift.</li></ul><p>e) <strong>Residual Connections</strong>:</p><ul><li>Allow information to flow more easily through the network.</li><li>Help mitigate the vanishing gradient problem in deep networks.</li></ul><h3>3. Output Layer</h3><p>After passing through all the transformer blocks, we reach the output layer:</p><ul><li><strong>Linear Layer</strong>: Transforms the final hidden state vector to logits of vocabulary size.</li><li><strong>Softmax</strong>: Converts logits to probabilities for next token prediction.</li></ul><h3>Key Features of GPT</h3><ol><li><strong>Autoregressive</strong>: Predicts the next token based on previous tokens.</li><li><strong>Decoder-only</strong>: Unlike full transformers, GPT only uses the decoder part.</li><li><strong>Scaled up</strong>: Larger versions have more layers, wider layers, and larger vocabularies.</li><li><strong>Transfer Learning</strong>: Pretrained on a large corpus and fine-tuned for specific tasks.</li></ol><h3>The Power of Scale</h3><p>What makes models like GPT-3 so impressive is their scale. GPT-3 boasts:</p><ul><li>175 billion parameters</li><li>96 attention layers</li><li>A batch size of 3.2 million</li></ul><p>This massive scale allows GPT to capture intricate patterns and relationships in language, leading to its impressive performance across various tasks.</p><h3>Limitations to Keep in Mind</h3><p>Despite its power, GPT does have limitations:</p><ol><li>Lacks long-term memory</li><li>Limited interpretability</li><li>Fixed maximum input size</li><li>Slow inference time</li><li>Potential biases from training data</li></ol><h3>Conclusion</h3><p>The GPT architecture represents a significant leap forward in AI language models. By breaking down text into tokens, transforming them into rich representations, and processing them through multiple layers of attention and feedforward networks, GPT can generate human-like text with remarkable coherence and relevance.</p><p>As these models continue to evolve and grow in scale, we can expect even more impressive capabilities in the future. However, it’s crucial to remain aware of their limitations and potential biases as we integrate them into various applications.</p><p>Understanding the architecture of GPT not only satisfies our curiosity but also helps us better appreciate the complexities involved in modern AI language models. As we continue to push the boundaries of what’s possible with AI, who knows what the next iteration of these models</p><p>The heart of GPT lies in its transformer blocks. These are repeated multiple times (N times) in the architecture. Each block contains:</p><p>a) <strong>Multi-Head Self-Attention Layer</strong>:</p><ul><li>This allows tokens to ‘pay attention’ to other tokens in the input.</li><li>Multiple ‘heads’ capture different types of relationships between tokens.</li><li>It uses alternating dense and sparse attention patterns for efficiency.</li></ul><p>b) <strong>Layer Normalization</strong>:</p><ul><li>Normalizes the outputs for stability.</li><li>Helps accelerate training and improve model performance.</li></ul><p>c) <strong>Feedforward Neural Network</strong>:</p><ul><li>Processes information from the attention layer.</li><li>Consists of two linear transformations with a ReLU activation in between.</li><li>Adds non-linearity, allowing the model to learn more complex functions.</li></ul><p>d) <strong>Another Layer Normalization</strong>:</p><ul><li>Ensures stable and consistent training.</li><li>Helps prevent internal covariate shift.</li></ul><p>e) <strong>Residual Connections</strong>:</p><ul><li>Allow information to flow more easily through the network.</li><li>Help mitigate the vanishing gradient problem in deep networks.</li></ul><h3>3. Output Layer</h3><p>After passing through all the transformer blocks, we reach the output layer:</p><ul><li><strong>Linear Layer</strong>: Transforms the final hidden state vector to logits of vocabulary size.</li><li><strong>Softmax</strong>: Converts logits to probabilities for next token prediction.</li></ul><h3>Key Features of GPT</h3><ol><li><strong>Autoregressive</strong>: Predicts the next token based on previous tokens.</li><li><strong>Decoder-only</strong>: Unlike full transformers, GPT only uses the decoder part.</li><li><strong>Scaled up</strong>: Larger versions have more layers, wider layers, and larger vocabularies.</li><li><strong>Transfer Learning</strong>: Pretrained on a large corpus and fine-tuned for specific tasks.</li></ol><h3>The Power of Scale</h3><p>What makes models like GPT-3 so impressive is their scale. GPT-3 boasts:</p><ul><li>175 billion parameters</li><li>96 attention layers</li><li>A batch size of 3.2 million</li></ul><p>This massive scale allows GPT to capture intricate patterns and relationships in language, leading to its impressive performance across various tasks.</p><h3>Limitations to Keep in Mind</h3><p>Despite its power, GPT does have limitations:</p><ol><li>Lacks long-term memory</li><li>Limited interpretability</li><li>Fixed maximum input size</li><li>Slow inference time</li><li>Potential biases from training data</li></ol><h3>Conclusion</h3><p>The GPT architecture represents a significant leap forward in AI language models. By breaking down text into tokens, transforming them into rich representations, and processing them through multiple layers of attention and feedforward networks, GPT can generate human-like text with remarkable coherence and relevance.</p><p>As these models continue to evolve and grow in scale, we can expect even more impressive capabilities in the future. However, it’s crucial to remain aware of their limitations and potential biases as we integrate them into various applications.</p><p>Understanding the architecture of GPT not only satisfies our curiosity but also helps us better appreciate the complexities involved in modern AI language models. As we continue to push the boundaries of what’s possible with AI, who knows what the next iteration of these models might bring?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a002e5df348" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>