<?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" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ interview - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ interview - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 24 May 2026 16:30:14 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/interview/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Prep for Technical Interviews – A Guide for Web Developers
 ]]>
                </title>
                <description>
                    <![CDATA[ Over the years I've participated in dozens of technical interviews. I've answered technical questions one-on-one with the CTO and in a group with the dev team. I've taken quizzes with a timer and buil ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-prep-for-technical-interviews-guide-for-web-devs/</link>
                <guid isPermaLink="false">69dd2c59217f5dfcbd261b21</guid>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Technical interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ jobs ]]>
                    </category>
                
                    <category>
                        <![CDATA[ job search ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Ilyas Seisov ]]>
                </dc:creator>
                <pubDate>Mon, 13 Apr 2026 17:48:09 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/uploads/covers/5e1e335a7a1d3fcc59028c64/b179e59d-bb58-41cb-8191-4e9523412933.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Over the years I've participated in dozens of technical interviews.</p>
<p>I've answered technical questions one-on-one with the CTO and in a group with the dev team. I've taken quizzes with a timer and built features into existing apps in live mode.</p>
<p>I've live coded algorithms, done take home assignments, and demonstrated my system design skills.</p>
<p>And all this has given me a lot of knowledge and experience that I want to share with you now.</p>
<p>In this guide, I'll share my top tips, recommendations, and <a href="https://www.99cards.dev/checklists">checklists</a> to help you prepare for and pass your technical interviews. These will level up your game and increase your chances of getting a job.</p>
<h3 id="heading-what-well-cover">What We'll Cover:</h3>
<ul>
<li><p><a href="#heading-introduction">Introduction</a></p>
</li>
<li><p><a href="#heading-the-secret-that-will-increase-your-interview-performance-by-53-at-least-it-did-for-me">The Secret That Will Increase Your Interview Performance By 53% (at Least It Did For Me)</a></p>
<ul>
<li><p><a href="#heading-1-big-tech-faang-level-companies">1. Big Tech / FAANG-level Companies</a></p>
</li>
<li><p><a href="#heading-2-mid-size-product-companies-saas">2. Mid-size Product Companies / SaaS</a></p>
</li>
<li><p><a href="#heading-3-startups-early-stage">3. Startups (Early-stage)</a></p>
</li>
<li><p><a href="#heading-4-design-agencies-creative-studios">4. Design Agencies / Creative Studios</a></p>
</li>
<li><p><a href="#heading-5-enterprise-corporate-companies">5. Enterprise / Corporate Companies</a></p>
</li>
<li><p><a href="#heading-6-e-commerce-amp-marketing-agencies">6. E-commerce &amp; Marketing Agencies</a></p>
</li>
<li><p><a href="#heading-7-ai-first-modern-tech-companies">7. AI-first / Modern Tech Companies</a></p>
</li>
<li><p><a href="#heading-8-freelance-indie-micro-saas">8. Freelance / Indie / Micro-SaaS</a></p>
</li>
</ul>
</li>
<li><p><a href="#heading-step-1-building-a-strong-foundation-in-core-web-development-concepts">Step 1: Building a Strong Foundation in Core Web Development Concepts</a></p>
</li>
<li><p><a href="#heading-step-2-going-deeper-into-subject-matter">Step 2: Going Deeper Into Subject Matter</a></p>
</li>
<li><p><a href="#heading-interview-preparation-guide">Interview Preparation Guide</a></p>
<ul>
<li><p><a href="#heading-1-answer-technical-questions-1-on-1-many-to-1">1. Answer Technical Questions (1-on-1 / Many-to-1)</a></p>
</li>
<li><p><a href="#heading-2-go-through-quizzes-with-a-timer">2. Go Through Quizzes with a Timer</a></p>
</li>
<li><p><a href="#heading-3-build-features-into-existing-apps-live-mode">3. Build Features into Existing Apps (Live Mode)</a></p>
</li>
<li><p><a href="#heading-4-live-code-algorithms">4. Live Code Algorithms</a></p>
</li>
<li><p><a href="#heading-5-take-home-assignments">5. Take Home Assignments</a></p>
</li>
<li><p><a href="#heading-6-system-design">6. System Design</a></p>
</li>
<li><p><a href="#heading-a-fun-story">A Fun Story</a></p>
</li>
</ul>
</li>
<li><p><a href="#heading-most-important-part">Most Important Part</a></p>
<ul>
<li><a href="#heading-pdca-framework">PDCA Framework</a></li>
</ul>
</li>
<li><p><a href="#heading-conclusion">Conclusion</a></p>
<ul>
<li><a href="#heading-ps">P.S.</a></li>
</ul>
</li>
</ul>
<h2 id="heading-introduction">Introduction</h2>
<p>The technical interview is designed to test how you think, code, and communicate. It's about both explaining your reasoning and showing what you can do. Think of it like a performance: the more you practice, the more natural and confident you’ll feel when you're actually doing it.</p>
<p>You’ll usually go through three main steps:</p>
<ul>
<li><p><strong>Technical screening:</strong> a short 15–30 minute call to check your basics and interest in the role.</p>
</li>
<li><p><strong>Coding challenge:</strong> you’ll solve problems either through a take-home project or a live coding test. This shows how you write, structure, and test your code.</p>
</li>
<li><p><strong>Whiteboard interview:</strong> you solve problems on a shared screen while explaining your thinking out loud. It’s less about being perfect and more about how you approach problems.</p>
</li>
</ul>
<p>During these stages, interviewers focus on a few key areas:</p>
<ul>
<li><p><strong>Data structures:</strong> Ways to organize data (like folders in a filing system).</p>
</li>
<li><p><strong>Algorithms:</strong> Step-by-step methods to solve problems.</p>
</li>
<li><p><strong>System design (for senior roles):</strong> Planning how large systems work, similar to designing a building that supports many users at once.</p>
</li>
</ul>
<p>Overall, they’re looking at how you think, not just what you know.</p>
<h2 id="heading-the-secret-that-will-increase-your-interview-performance-by-53-at-least-it-did-for-me">The Secret That Will Increase Your Interview Performance By 53% (at Least It Did For Me)</h2>
<p>The secret is: <strong>narrow your focus.</strong></p>
<p>Before you spend even one minute preparing, specify exactly what type of company you want to work for.</p>
<p>Why?</p>
<p>Because this choice will reveal what exactly you'll have study and practice before your technical interview.</p>
<p>Let's go over the main categories of companies so you can work on narrowing your focus.</p>
<h3 id="heading-1-big-tech-faang-level-companies">1. Big Tech / FAANG-level Companies</h3>
<p>(Google, Amazon, Meta, Apple, Microsoft)</p>
<p><strong>Core skills:</strong></p>
<ul>
<li><p>Data structures &amp; algorithms</p>
</li>
<li><p>System design (scalability, distributed systems)</p>
</li>
<li><p>Computer science fundamentals (OS, networking)</p>
</li>
</ul>
<h3 id="heading-2-mid-size-product-companies-saas">2. Mid-size Product Companies / SaaS</h3>
<p>(Shopify, Stripe, Notion)</p>
<p><strong>Core skills:</strong></p>
<ul>
<li><p>Strong stack knowledge (React, Next.js, Node.js)</p>
</li>
<li><p>API design &amp; integrations</p>
</li>
<li><p>Database design (SQL/NoSQL)</p>
</li>
</ul>
<h3 id="heading-3-startups-early-stage">3. Startups (Early-stage)</h3>
<p><strong>Core skills:</strong></p>
<ul>
<li><p>Full-stack development</p>
</li>
<li><p>Rapid prototyping</p>
</li>
<li><p>Shipping features end-to-end</p>
</li>
</ul>
<h3 id="heading-4-design-agencies-creative-studios">4. Design Agencies / Creative Studios</h3>
<p><strong>Core skills:</strong></p>
<ul>
<li><p>Advanced HTML, CSS, JavaScript</p>
</li>
<li><p>Animation (GSAP, Framer Motion)</p>
</li>
<li><p>Pixel-perfect implementation</p>
</li>
</ul>
<h3 id="heading-5-enterprise-corporate-companies">5. Enterprise / Corporate Companies</h3>
<p><strong>Core skills:</strong></p>
<ul>
<li><p>Backend development (Java, .NET, and so on)</p>
</li>
<li><p>Databases (SQL, enterprise systems)</p>
</li>
<li><p>APIs &amp; microservices</p>
</li>
</ul>
<h3 id="heading-6-e-commerce-amp-marketing-agencies">6. E-commerce &amp; Marketing Agencies</h3>
<p><strong>Core skills:</strong></p>
<ul>
<li><p>Shopify / WordPress</p>
</li>
<li><p>Frontend development</p>
</li>
<li><p>SEO &amp; performance optimization</p>
</li>
</ul>
<h3 id="heading-7-ai-first-modern-tech-companies">7. AI-first / Modern Tech Companies</h3>
<p>(OpenAI, Anthropic)</p>
<p><strong>Core skills:</strong></p>
<ul>
<li><p>AI API integration (LLMs, embeddings)</p>
</li>
<li><p>Prompt engineering</p>
</li>
<li><p>Backend &amp; data handling</p>
</li>
</ul>
<h3 id="heading-8-freelance-indie-micro-saas">8. Freelance / Indie / Micro-SaaS</h3>
<p><strong>Core skills:</strong></p>
<ul>
<li><p>Full-stack development (Next.js)</p>
</li>
<li><p>Payments &amp; authentication systems</p>
</li>
<li><p>Deployment &amp; basic marketing</p>
</li>
</ul>
<p>Keep in mind that these are just high-level recommendations. There are, of course, other skills you'll need to focus on depending on the role you're hoping to get. This is just a general guideline to get you started.</p>
<p>Also, fun fact: if you ask a top FAANG developer to code an <a href="https://www.awwwards.com/">Awwwards</a>-style landing page, they'll most likely fail. And similarly, an award-winning web designer from a top notch agency will probably perform poorly at an algorithm assignment. Why? Each field requires its own skillset. So make sure you choose and focus on yours.</p>
<h2 id="heading-step-1-building-a-strong-foundation-in-core-web-development-concepts">Step 1: Building a Strong Foundation in Core Web Development Concepts</h2>
<p>So, now I assume that you've decided on the type of company you want to work for.</p>
<p>The next step is check whether you have or need to work on the basic fundamentals. Most candidates fail not because they lack experience, but because their basics are shaky.</p>
<p>A solid foundation makes everything else easier: coding challenges, system design, and even real-world tasks.</p>
<p>Focus on learning the core building blocks:</p>
<ul>
<li><p><strong>HTML &amp; CSS</strong></p>
</li>
<li><p><strong>JavaScript fundamentals</strong></p>
</li>
<li><p><strong>One solid framework:</strong> Get really good at one stack (like React + Next.js).</p>
</li>
<li><p><strong>APIs &amp; backend basics:</strong> Learn how data flows. Understand REST APIs, authentication, and how frontend connects to backend.</p>
</li>
<li><p><strong>Databases:</strong> Know the difference between SQL and NoSQL. Be comfortable with basic queries and data modeling.</p>
</li>
<li><p><strong>Git &amp; workflows:</strong> You should be confident with version control, branching, and collaborating on code.</p>
</li>
</ul>
<p>The goal is not to know everything. The goal is to be clear, confident, and consistent in the fundamentals.</p>
<p>If your basics are strong, you’ll solve problems faster, explain your thinking better, and stand out naturally in interviews.</p>
<p>One of the most effective ways to get better at fundamentals is by practicing with flashcards. I've created a system called the <a href="https://99cards.dev/">99cards app</a> that can help with this if you want to check it out.</p>
<h2 id="heading-step-2-going-deeper-into-subject-matter">Step 2: Going Deeper Into Subject Matter</h2>
<p>By this step, you've chosen the type of company you want to work for and you're confident that you know core web development skills.</p>
<p>Next, you'll need to practice specific skills related to your company and preferred job type (for example algorithms or building features in live mode).</p>
<p>Hint: In about 80% of cases, the first step is an HR interview. This happens before the technical round. Use this opportunity to your advantage.</p>
<p>When I get invited to a technical interview, the first thing I do is ask the HR manager what I should prepare. Just a simple question – and surprisingly, I almost always get a clear answer concerning:</p>
<ul>
<li><p>What topics to focus on</p>
</li>
<li><p>What kind of tasks to expect</p>
</li>
<li><p>Sometimes even tools or formats they’ll use</p>
</li>
</ul>
<p>This gives you a huge advantage. Instead of guessing, you can prepare with intention.</p>
<h2 id="heading-interview-preparation-guide">Interview Preparation Guide</h2>
<h3 id="heading-1-answer-technical-questions-1-on-1-many-to-1">1. Answer Technical Questions (1-on-1 / Many-to-1)</h3>
<p>This is usually a conversation with a CTO or a full dev team. They'll want to understand how you think, not just what you know. Stay calm and treat it like a discussion, not an exam.</p>
<p>Keep your answers simple and structured:</p>
<ul>
<li><p>Explain your thought process step by step</p>
</li>
<li><p>Use real examples from your experience</p>
</li>
<li><p>If you don’t know something, say it and think out loud</p>
</li>
</ul>
<p>In many-to-one interviews, don’t get overwhelmed. Focus on one question at a time and engage with the person speaking.</p>
<p>For example, when I was looking to hire a web developer for my <a href="https://bettter.app/">micro SaaS</a>, I didn't care about algorithms, but I cared deeply that they have thorough Next JS skills.</p>
<p>For that, I tested candidates via flashcards in live mode.</p>
<h4 id="heading-how-to-effectively-prepare">How to effectively prepare</h4>
<p>Practice explaining concepts out loud, not just in your head. Pretend you’re teaching someone.</p>
<p>Do <a href="https://www.freecodecamp.org/news/real-world-coding-interview-for-software-engineering/">mock interviews</a> with a friend or record yourself. Focus on clarity and structure.</p>
<ul>
<li><p>Prepare stories from past projects</p>
</li>
<li><p>Review core concepts (JS, React, APIs)</p>
</li>
<li><p>Practice saying “I don’t know” confidently</p>
</li>
</ul>
<h3 id="heading-2-go-through-quizzes-with-a-timer">2. Go Through Quizzes with a Timer</h3>
<p>Timed quizzes test your speed and basics. These are often multiple-choice or short coding questions. The goal is accuracy under pressure.</p>
<p>A few tips:</p>
<ul>
<li><p>Don’t spend too long on one question. Skip and come back if needed.</p>
</li>
<li><p>Practice common patterns beforehand.</p>
</li>
</ul>
<p>Speed improves with repetition. Train like it’s a game.</p>
<h4 id="heading-how-to-effectively-prepare">How to effectively prepare</h4>
<p>Use platforms with timed tests to simulate pressure. Track your speed and accuracy.</p>
<p>Focus on common topics that appear often.</p>
<ul>
<li><p>JavaScript fundamentals</p>
</li>
<li><p>Basic algorithms</p>
</li>
<li><p>Output-based questions</p>
</li>
</ul>
<p>Practice daily in short sessions. Consistency beats long study sessions.</p>
<h3 id="heading-3-build-features-into-existing-apps-live-mode">3. Build Features into Existing Apps (Live Mode)</h3>
<p>During technical interviews, you’ll often work on a real or mock project. This tests how you read code, understand structure, and make changes safely.</p>
<p>Focus on:</p>
<ul>
<li><p>Understanding the codebase first</p>
</li>
<li><p>Asking clarifying questions</p>
</li>
<li><p>Writing clean, simple solutions</p>
</li>
</ul>
<p>Talk while you work. Explain what you’re doing and why.</p>
<h4 id="heading-how-to-effectively-prepare">How to effectively prepare</h4>
<p>Practice working with someone else's codebase (not your own). Clone open-source projects and explore them, for example.</p>
<p>Train your ability to navigate and understand code quickly.</p>
<ul>
<li><p>Read files before coding</p>
</li>
<li><p>Trace data flow</p>
</li>
<li><p>Make small, safe changes</p>
</li>
</ul>
<p>Also practice explaining your actions while coding.</p>
<h3 id="heading-4-live-code-algorithms">4. Live Code Algorithms</h3>
<p>This is where many developers struggle. You’ll solve problems in real time while explaining your thinking.</p>
<p>Don’t rush to code. First:</p>
<ul>
<li><p>Clarify the problem</p>
</li>
<li><p>Talk through your approach</p>
</li>
<li><p>Start with a simple solution, then improve it</p>
</li>
</ul>
<p>Interviewers care more about your thinking than a perfect answer.</p>
<h4 id="heading-how-to-effectively-prepare">How to effectively prepare</h4>
<p>Practice common algorithm problems regularly. Focus on patterns, not memorization.</p>
<p>Solve problems out loud, as if someone is listening.</p>
<ul>
<li><p>Arrays, strings, hash maps</p>
</li>
<li><p>Sorting and searching</p>
</li>
<li><p>Basic recursion</p>
</li>
</ul>
<p>Time yourself and review your solutions after.</p>
<h3 id="heading-5-take-home-assignments">5. Take Home Assignments</h3>
<p>These simulate real work. You get time to build something properly. This is your chance to stand out.</p>
<p>What matters most:</p>
<ul>
<li><p>Clean, readable code</p>
</li>
<li><p>Good structure and naming</p>
</li>
<li><p>Clear README with your decisions</p>
</li>
</ul>
<p>Don’t overbuild. Focus on quality, not quantity. A smaller, more focused take-home project that's done is better than an overly complex or overly ambitious one that's incomplete.</p>
<h4 id="heading-how-to-effectively-prepare">How to effectively prepare</h4>
<p>Build small projects with real-world structure. Practice finishing, not just starting.</p>
<p>Pay attention to presentation and clarity.</p>
<ul>
<li><p>Write clean commits</p>
</li>
<li><p>Add a clear README</p>
</li>
<li><p>Handle edge cases</p>
</li>
</ul>
<p>Think like you’re submitting work to a real client.</p>
<h3 id="heading-6-system-design">6. System Design</h3>
<p>This is common for mid to senior roles. You’ll design a system from scratch or improve an existing one.</p>
<p>Start simple, then expand:</p>
<ul>
<li><p>Define the requirements</p>
</li>
<li><p>Sketch a basic architecture</p>
</li>
<li><p>Discuss scaling, performance, and trade-offs</p>
</li>
</ul>
<p>Think like a builder, not just a programmer. Show how you make decisions.</p>
<h4 id="heading-how-to-effectively-prepare">How to effectively prepare</h4>
<p>Study common <a href="https://www.freecodecamp.org/news/learn-system-design-principles/">system design patterns</a> and real-world architectures. Start with simple systems.</p>
<p>Practice breaking problems into parts.</p>
<ul>
<li><p>APIs and data flow</p>
</li>
<li><p>Databases and caching</p>
</li>
<li><p>Scaling basics</p>
</li>
</ul>
<p>Watch system design interviews and practice explaining your ideas clearly.</p>
<p>For each of these interviews you can use my free <a href="https://99cards.dev/checklists">checklists</a> to prepare even more effectively.</p>
<h3 id="heading-a-fun-story">A Fun Story</h3>
<p>Once I applied to a front-end web developer job at company that focuses on building Awwwards-style websites. The tech interview was take home assignment: I had to rebuild Figma design into a modern GSAP-animated website. I failed to do that.</p>
<p>In 18 months, the same company had an open position. I applied. Can you guess what the tech assignment was? 😄</p>
<p>It was the same.</p>
<p>Draw your own conclusions.</p>
<h2 id="heading-most-important-part">Most Important Part</h2>
<p>Here's a helpful framework to keep in mind when you're going through this process:</p>
<h3 id="heading-pdca-framework">PDCA Framework</h3>
<p>P - plan<br>D - do<br>C - check<br>A- act</p>
<p>It's my go to framework for every subject I want to get better at. Let me explain how to apply this to tech interviews.</p>
<p><strong>Plan:</strong> in this stage, you plan your preparation routine and work on your interview performance game.</p>
<p><strong>Do:</strong> in this stage, you're actually trying to do what you have planned.</p>
<p><strong>Check:</strong> here, you compare your Plan and Do stages. Analyze the difference and see what you can improve.</p>
<p><strong>Act:</strong> finally, make adjustments that will help improve Plan 2.0.</p>
<p>Repeat until you get the desired result.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Technical interviews are not about being perfect. They’re about showing how you think, communicate, and solve problems under pressure. The more you practice the <em>right way</em>, the more confident and natural you’ll feel.</p>
<p>Focus on the basics, prepare for your target company, and train in real interview conditions. If you do that, you’ll already be ahead of most candidates.</p>
<h3 id="heading-ps">P.S.</h3>
<p>If you want to speed up your prep and stop guessing, I put together a complete toolkit for you.</p>
<p>It contains:</p>
<ul>
<li><p>Interview Checklists</p>
</li>
<li><p>CV Template</p>
</li>
<li><p>Cover Letter Template</p>
</li>
<li><p>List of Top 50 Remote-First Companies</p>
</li>
<li><p>Job Application Tracker Spreadsheet</p>
</li>
</ul>
<p>You can find it here: <a href="http://99cards.dev/toolkit"><strong>99cards.dev/toolkit</strong></a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Prepare for Technical Job Interviews –  Based on My Experience Landing a Job ]]>
                </title>
                <description>
                    <![CDATA[ Hi, I’m Ilyas. I’m a web developer, and this is my story about how I struggled with interviews for a long time and what finally helped me break through. I’ll talk about what failing basic interview questions taught me about recall, preparation, and s... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-prepare-for-technical-job-interviews-based-on-my-experience-landing-a-job/</link>
                <guid isPermaLink="false">694c23da6c9dee59dd506fea</guid>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview preparations ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Junior developer  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ career advice ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Interview tips ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Ilyas Seisov ]]>
                </dc:creator>
                <pubDate>Wed, 24 Dec 2025 17:33:14 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1766597367293/515dd71a-fb65-4508-bdd2-39b103ddb438.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hi, I’m Ilyas. I’m a web developer, and this is my story about how I struggled with interviews for a long time and what finally helped me break through. I’ll talk about what failing basic interview questions taught me about recall, preparation, and smarter job searching.</p>
<p>If you’re a junior, mid-level, or self-taught developer who keeps getting rejected and you don’t fully understand why, I hope this helps.</p>
<p>Here’s what I’ll cover:</p>
<ol>
<li><p><a class="post-section-overview" href="#heading-my-18-month-job-search-struggle">My 18-Month Job Search Struggle</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-the-interview-problem-i-didnt-expect">The Interview Problem I Didn’t Expect</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-discovering-active-recall-and-flashcards">Discovering Active Recall and Flashcards</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-my-interview-preparation-system">My Interview Preparation System</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-the-results">The Results</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-changing-how-i-looked-for-jobs">Changing How I Looked for Jobs</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-turning-my-system-into-a-small-tool">Turning My System Into a Small Tool</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-lessons-i-learned">Lessons I learned</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-final-thoughts">Final Thoughts</a></p>
</li>
</ol>
<h2 id="heading-my-18-month-job-search-struggle">My 18-Month Job Search Struggle</h2>
<p>For 18 months, I was trying to land a remote or relocation web developer job.</p>
<p>During that time:</p>
<ul>
<li><p>I applied to more than 1,000 positions</p>
</li>
<li><p>I went through around 20–30 interviews</p>
</li>
<li><p>I failed most of them</p>
</li>
</ul>
<p>It was exhausting. I felt like I was putting in a lot of effort but getting almost no results. Over time, I started doubting my skills and wondering whether I would ever find a job I’d actually be satisfied with.</p>
<p>What made this even more confusing was that a few years earlier, in 2021, I had found a remote job at a US company in just three weeks – with almost no experience</p>
<p>Something clearly wasn’t working anymore.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766404237516/f3465911-0d09-458b-9dd6-a91ee03524cf.jpeg" alt="real screenshot from one my unsuccessful interviews from Turing.com" class="image--center mx-auto" width="687" height="490" loading="lazy"></p>
<h2 id="heading-the-interview-problem-i-didnt-expect">The Interview Problem I Didn’t Expect</h2>
<p>After dozens of interviews, I noticed a pattern: I wasn’t failing because I couldn’t solve complex algorithm problems or build features under pressure. I was failing on basic technical questions.</p>
<p>Questions like:</p>
<ul>
<li><p><strong>“What are portals in React?”</strong></p>
</li>
<li><p><strong>“Can you explain how an HTTP GET request works?”</strong></p>
</li>
</ul>
<p>These were not hard questions. They were things I had learned before. But during interviews, under pressure, <strong>I just couldn’t recall.</strong> Or simply I skipped it during preparation because there were no systems in place.</p>
<p>That’s when I realized the real issue: I didn’t have a problem understanding concepts. I had a problem recalling them quickly.</p>
<p>My first instinct was to study more. More tutorials, more articles, more videos.</p>
<p>But passive learning didn’t fix the problem. I still froze during interviews. What I actually needed was a way to <strong>train my memory</strong>, not just consume information.</p>
<h2 id="heading-discovering-active-recall-and-flashcards">Discovering Active Recall and Flashcards</h2>
<p>That’s when I came across flashcards and the concept of <strong>active recall</strong>.</p>
<p>Active recall means testing yourself repeatedly on what you’ve learned instead of just rereading material. You try to answer a question from memory first, then check the answer. This approach has been backed by research for more than a century.</p>
<p>I started practicing small, specific concepts this way, like:</p>
<ul>
<li><p>React fundamentals</p>
</li>
<li><p>JavaScript basics</p>
</li>
<li><p>HTTP methods</p>
</li>
<li><p>Browser behavior</p>
</li>
</ul>
<p>I repeated them until recalling the answer felt automatic.</p>
<p>This made a huge difference during interviews.</p>
<p>Flashcards help you cut through the noise and actually learn what matters. It's not just about memorizing facts – it's about really understanding, remembering fast, and building a solid base in every concept you study.</p>
<p>So to help you prepare for your interviews, I’ve taken years of experience and scientific learning methods and turned them into a tool and approach that gives you the right info at the right time.</p>
<h2 id="heading-my-interview-preparation-system">My Interview Preparation System</h2>
<p>Once I found the right learning method, I built a simple system around it.</p>
<h3 id="heading-step-1-ask-what-to-prepare-for">Step 1: Ask What to Prepare For</h3>
<p>Instead of guessing what to study, I started asking recruiters directly:</p>
<blockquote>
<p>“What topics should I prepare for the technical interview?”</p>
</blockquote>
<p>Surprisingly, many of them replied with a clear list, which helped me focus only on what actually mattered and avoid over-preparing random topics. In my experience, many HR reps are quite helpful to job applicants.</p>
<p>For example, when I applied for a position as a Frontend Web Developer in React, the HR specialist advised me to focus mainly on React and JavaScript. So I prepared for all the popular questions around hoisting (JS), the event loop (JS), how react works under the hood, what props are and how they work, and so on.</p>
<p>Overall, that interview went well – but when I got a question on React Portals, I couldn’t explain it properly. And so I didn’t get the position. But I don’t blame myself for this one, as that’s a very rare topic. 😊</p>
<p>I also applied for another Front End Developer role where the HR specialist advised me to prepare mainly for questions about GSAP, Framer Motion, and React/Next JS. This made sense, as the company mainly builds modern animated websites.</p>
<p>In my interview, the theory round went well, but I failed the take home assignment. I realized then that I didn’t have enough skills in these areas.</p>
<p>At another company, I asked HR about the cultural interview, which was the last round. The rep said: ”<em>No worries, all the hard work is done from your side. Prep for just a human dialog.</em>”</p>
<p>And for the last application I submitted (and after which I actually got the job offer), the HR specialist told me to strongly prepare for CSS – especially Flexbox and Grid<strong>.</strong> This made sense, as the position was for an HTML markup developer. And so I practiced all the ins and outs for these topics, even the more rare ones.</p>
<p>I use the same approach for each round of interviews.</p>
<h3 id="heading-step-2-use-flashcards-with-ai-carefully">Step 2: Use Flashcards (With AI Carefully)</h3>
<p>I used ChatGPT to generate flashcards for each topic and reviewed them daily.</p>
<p>One important thing I learned: <strong>AI can be wrong sometimes.</strong> To reduce mistakes, I started adding links to official documentation in my prompts so the answers were grounded in reliable sources.</p>
<p>I kept sessions short and consistent. That consistency mattered more than long study sessions.</p>
<blockquote>
<p><strong>AI mistakes</strong> was the reason I created <a target="_blank" href="https://99cards.dev/">99cards.dev</a></p>
</blockquote>
<p>Here is the prompt I use in ChatGPT:</p>
<p><em>You are a web development expert with 20 years of experience. Your task is to help me to prepare for the interview.</em></p>
<p><em>Prepare 10 flashcards on CSS Flexbox topics. Format one question with four answers. One answer is correct.</em></p>
<p><em>You're going to serve all the questions one by one. After I answer, you give me feedback and then give me the next question.</em></p>
<p>Note that you should tweak your prompts for your needs, and based on what you need to review.</p>
<p>You can experiment with various factors, such as:</p>
<ul>
<li><p><strong>Difficulty:</strong> beginner or advanced</p>
</li>
<li><p><strong>Specificity:</strong> from vague (for example: I want to practice with CSS) to highly specific (for example: I want to practice with the flex property in CSS Flexbox)</p>
</li>
<li><p><strong>Number of questions:</strong> sweet spot is between 10 and 20</p>
</li>
<li><p><strong>Add context:</strong> good practice is to add links to official docs, as it decreases the chances of AI hallucination</p>
</li>
</ul>
<p>Here is a typical flashcard created by ChatGPT:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766489222813/57a6b0eb-de79-46a3-89d6-aaeeeffdf04e.png" alt="flashcard created with ChatGPT" class="image--center mx-auto" width="762" height="687" loading="lazy"></p>
<p>If you provide an answer, you’ll get feedback like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766489282577/910c04a0-6f2a-4304-9f39-3644b2c40bd9.png" alt="feedback by ChatGPT" class="image--center mx-auto" width="1327" height="674" loading="lazy"></p>
<h2 id="heading-the-results">The Results</h2>
<p>After a few weeks, interviews felt very different.</p>
<p>I was calmer. I answered basic questions without panicking. I could explain concepts clearly and confidently.</p>
<p>In my final interview process, I passed four rounds in a row and scored 95% on the technical test.</p>
<p>Soon after, I received an offer: $5,500 per month and a paid relocation package for my family and me.</p>
<p>For the first time in a long while, my effort finally matched the results.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766404662077/70e690b2-6fd0-448c-a83e-456ab1b12555.jpeg" alt="screenshot of job offer" class="image--center mx-auto" width="786" height="989" loading="lazy"></p>
<h2 id="heading-changing-how-i-looked-for-jobs">Changing How I Looked for Jobs</h2>
<p>About six weeks before getting the offer, I also changed <strong>where</strong> I searched for jobs.</p>
<p>Instead of relying only on large job platforms, I started using smaller communities like Telegram job groups.</p>
<p>This helped for two reasons:</p>
<ol>
<li><p><strong>Less competition</strong>: many smaller companies post roles there with fewer applicants</p>
</li>
<li><p><strong>Direct communication</strong>: I could message recruiters before applying</p>
</li>
</ol>
<p>Before submitting an application, I would ask:</p>
<blockquote>
<p>“I saw this position. Here’s my CV and LinkedIn. Am I a good fit?”</p>
</blockquote>
<p>If the answer was yes, I applied. If not, I moved on immediately.</p>
<p>This saved me a lot of time and energy.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766404678028/9e6a2452-2c6c-48b8-8494-629742865a70.png" alt="job groups in Telegram" class="image--center mx-auto" width="722" height="595" loading="lazy"></p>
<h2 id="heading-turning-my-system-into-a-small-tool">Turning My System Into a Small Tool</h2>
<p>While preparing for interviews, I created thousands of flashcards for myself. Managing them in notes became difficult, so I eventually turned them into a small tool called <a target="_blank" href="https://99cards.dev/"><strong>99cards.dev</strong></a>.</p>
<p>It’s simply a collection of fact-checked web development flashcards grouped by topic, based on the same approach that helped me stop failing basic interview questions.</p>
<p>Here are some screenshots from the app:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766490090653/a54606f6-91d1-4302-8f39-15fa6d2d26a6.png" alt="99cards.dev - UI screenshots" class="image--center mx-auto" width="1920" height="1094" loading="lazy"></p>
<h2 id="heading-lessons-i-learned">Lessons I Learned</h2>
<p>Here are a few takeaways from this experience:</p>
<ul>
<li><p>Failing interviews doesn’t always mean you lack skills</p>
</li>
<li><p>Passive learning is not enough for interview prep</p>
</li>
<li><p>Being able to recall basics quickly matters a lot</p>
</li>
<li><p>Job searching is a skill, not just a numbers game</p>
</li>
<li><p>Consistency beats cramming every time</p>
</li>
</ul>
<h2 id="heading-final-thoughts">Final Thoughts</h2>
<p>If you’re struggling with interviews right now, especially as a junior, mid-level, or self-taught developer, don’t assume you’re bad at what you do.</p>
<p>In my case, the problem wasn’t effort or talent. It was preparation and approach.</p>
<p>I also created a <a target="_blank" href="https://99cards.dev/checklists"><strong>free interview checklist</strong></a> based on my experience, covering HR, technical, behavioral, system design, live coding, take-home tasks, algorithms, and cultural fit.</p>
<p>I hope this story saves you some time and stress.</p>
<p>You’re often just one good interview away.<br>— Ilyas</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ A Beginner Developer's Guide to Kanban ]]>
                </title>
                <description>
                    <![CDATA[ First, a confession: When I was learning to code, my “workflow” was a mess. Sticky notes. Google Docs. Random Trello boards I never checked again. And a to-do list that somehow never got any shorter. Then I joined a real team. Suddenly, I was introdu... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/a-beginner-developers-guide-to-kanban/</link>
                <guid isPermaLink="false">68815e6054ad71fa4b3b7bb6</guid>
                
                    <category>
                        <![CDATA[ agile ]]>
                    </category>
                
                    <category>
                        <![CDATA[ agile methodology ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Agile Software Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Career ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ kanban ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Kanban boards ]]>
                    </category>
                
                    <category>
                        <![CDATA[ project management ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Product Management ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Product Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Beginner Developers ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Developer ]]>
                    </category>
                
                    <category>
                        <![CDATA[ workflow ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Aditya Vikram Kashyap ]]>
                </dc:creator>
                <pubDate>Wed, 23 Jul 2025 22:12:48 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1753300952223/508231c9-f0bc-4aa8-9c97-5ad4157891b9.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>First, a confession<strong>:</strong> When I was learning to code, my “workflow” was a mess. Sticky notes. Google Docs. Random Trello boards I never checked again. And a to-do list that somehow never got any shorter.</p>
<p>Then I joined a real team.</p>
<p>Suddenly, I was introduced to this thing called <strong>Kanban</strong> – and I realized I’d been treating software like a solo art project, not a process.</p>
<p>If that sounds familiar, you’re in the right place.</p>
<p>This guide will walk you through <strong>how Kanban actually works</strong>, how developers use it to track and prioritize work, and how it can help you stay sane when juggling bugs, features, and real-world deadlines.</p>
<p>Without further delay, lets get into it.</p>
<h3 id="heading-heres-what-well-cover">Here’s what we’ll cover:</h3>
<ul>
<li><p><a class="post-section-overview" href="#heading-so-what-is-kanban">So… What Is Kanban?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-the-classic-kanban-board-three-simple-columns">The Classic Kanban Board: Three Simple Columns</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-developers-use-kanban-in-real-life">How Developers Use Kanban in Real Life</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-kanban-vs-scrum-whats-the-difference">Kanban vs Scrum: What’s the Difference?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-so-which-one-should-you-use-scrum-or-kanban">So which one should you use Scrum or Kanban?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-tools-do-teams-use-for-kanban">What Tools Do Teams Use for Kanban?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-use-kanban-to-manage-your-own-coding-projects">How to Use Kanban to Manage Your Own Coding Projects</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-final-thoughts-why-kanban-isnt-just-a-board">Final Thoughts: Why Kanban Isn’t Just a Board</a></p>
</li>
</ul>
<h2 id="heading-so-what-is-kanban">So… What Is Kanban?</h2>
<p>At its core, Kanban is a <strong>visual way to manage work</strong>. It helps teams (or team members) see:</p>
<ul>
<li><p>What needs to get done</p>
</li>
<li><p>What’s in progress</p>
</li>
<li><p>What’s finished</p>
</li>
<li><p>Where things are getting stuck</p>
</li>
</ul>
<p>The concept comes from lean manufacturing, but in tech, it’s often used in Agile teams that need flexibility without the structure of Scrum sprints.</p>
<p>Think of Kanban like a whiteboard that tells a story. Not just what’s done, but how work flows.</p>
<h2 id="heading-the-classic-kanban-board-three-simple-columns">The Classic Kanban Board: Three Simple Columns</h2>
<p>So what exactly is a Kanban board? At its core, it’s a visual representation of your workflow – a board that shows all the work your team (or you, solo warrior) are juggling, and where each task stands.</p>
<p>It can be physical, like an actual whiteboard with sticky notes that move from one column to the next. Or digital, using tools like Trello, Jira, GitHub Projects, or Notion. The key is that it’s visual and up-to-date. You can walk into a room or open a tab and instantly understand: What’s being worked on? What’s ready to go? Where are things stuck?</p>
<p>It’s like having your brain on a wall, but organized. And slightly less chaotic.</p>
<p>The beauty of Kanban is how dead simple it is to get started. At minimum, your board has three columns:</p>
<table><tbody><tr><td><p><strong>&nbsp;To Do</strong></p></td><td><p><strong>In Progress</strong></p></td><td><p><strong>Done</strong></p></td></tr></tbody></table>

<p>Each task – or <strong>card</strong> – moves from left to right as it gets worked on.</p>
<p>Let’s say your team is building a blog platform. Your Kanban board might have cards like:</p>
<ul>
<li><p>“Create signup form”</p>
</li>
<li><p>“Fix image upload bug”</p>
</li>
<li><p>“Deploy staging build”</p>
</li>
</ul>
<p>Now, while Kanban is flexible, it can absolutely be taken too far.</p>
<p>I’ve seen boards with more columns than a Greek temple: “Needs Review,” “Pending Client Feedback,” “QA Rework Round 2,” “Blocked but Still Hopeful,” “In Existential Limbo,” and so on. Every card had six tags, three owners, two checklists, and one migraine.</p>
<p>The lesson? Don’t turn your board into a bureaucratic jungle.</p>
<p>You don’t need to account for every edge case. Start simple: “To Do,” “In Progress,” “Review,” “Done.” These basic stages cover most workflows. If you discover a real need for something more – like a dedicated “QA” column or “Blocked” column – add it intentionally, not because you feel like your board needs to look fancy.</p>
<p>Remember: A Kanban board should be helpful, not overwhelming. If you spend more time managing the board than doing the work on it… it’s doing the opposite of what it’s meant to do.</p>
<h2 id="heading-how-developers-use-kanban-in-real-life">How Developers Use Kanban in Real Life</h2>
<p>Here’s how you might interact with a Kanban board on a dev team:</p>
<ol>
<li><p>You pick up a card from “To Do” – let’s say, “Add dark mode toggle.”</p>
</li>
<li><p>You move it to “In Progress.”</p>
</li>
<li><p>When it’s ready for review, you might move it to a temporary “Review” or “Testing” column.</p>
</li>
<li><p>Once it’s merged, tested, and deployed, you move it to “Done.”</p>
</li>
<li><p>You smile, drink some coffee, and grab the next card.</p>
</li>
</ol>
<p>That’s it. But over time, this process helps the whole team:</p>
<ul>
<li><p>Spot bottlenecks</p>
</li>
<li><p>Prevent duplicate work</p>
</li>
<li><p>Reduce context switching</p>
</li>
<li><p>Keep everyone aligned</p>
</li>
</ul>
<h3 id="heading-whats-a-wip-limit-and-why-should-you-care">What’s a WIP Limit — And Why Should You Care?</h3>
<p>WIP = <strong>Work In Progress</strong>. This is the most important concept to keep us in check.</p>
<p>One of Kanban’s key principles is <strong>limiting how many things you’re working on at once</strong>. Because guess what? Multitasking kills momentum.</p>
<p>A typical WIP limit might look like:</p>
<ul>
<li><p>No more than 2–3 cards per person in “In Progress” Again this is best practice, but folks do pick up a lot and then they end up being the bottleneck.</p>
</li>
<li><p>No more than 5 tasks waiting on QA.</p>
</li>
</ul>
<p>Why? Because when everything’s urgent, nothing gets done. WIP limits force you to finish one thing before you start more – and that’s how real velocity happens.</p>
<p>If there are more than 5 tasks in the “To Do” column, the team doesn’t take up new ones. Instead, everyone chips in to see how they can help unclog the bottleneck. A bottleneck is your worst enemy in Kanban, and you want to resolve it so items move smoothly on time and on target.</p>
<p><a target="_blank" href="https://youtu.be/R8dYLbJiTUE?si=Hh00XXI4_1urv4Mp">Here’s a video</a> recapping key concepts.</p>
<h2 id="heading-kanban-vs-scrum-whats-the-difference"><strong>Kanban vs Scrum: What’s the Difference?</strong></h2>
<p>You’ve probably heard Scrum and Kanban mentioned in the same breath – and both are popular Agile frameworks. But they’re not interchangeable.</p>
<p>Scrum is structured, with roles like Product Owner and Scrum Master, and work gets organized into time-boxed sprints. It’s perfect for teams that benefit from rhythm and rituals – like sprint planning, daily standups, and retrospectives.</p>
<p>Kanban, on the other hand, is a little looser. No official roles, no set sprint timelines. Work flows continuously, and change can happen anytime. It’s perfect for teams who need more flexibility and fewer ceremonies.</p>
<p>So how do they compare in practice? Let’s break it down:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Key Differentiating Factors</strong></td><td><strong>Scrum</strong></td><td><strong>Kanban</strong></td></tr>
</thead>
<tbody>
<tr>
<td>Time-based</td><td>Yes – 1–2 week sprints</td><td>No – continuous flow</td></tr>
<tr>
<td>Roles</td><td>PO, SM, Developers</td><td>No specific roles required</td></tr>
<tr>
<td>Planning</td><td>Sprint planning, retros, and so on</td><td>On-demand, just-in-time</td></tr>
<tr>
<td>Cadence</td><td>Fixed sprint cycle</td><td>Flexible, ongoing</td></tr>
<tr>
<td>Use case</td><td>Complex, structured teams</td><td>Continuous delivery teams</td></tr>
</tbody>
</table>
</div><p><strong>Bottom line:</strong></p>
<ul>
<li><p>Scrum is a scheduled loop. Kanban is a living flow.</p>
</li>
<li><p>One’s a playbook. The other’s a status window.</p>
</li>
</ul>
<p><a target="_blank" href="https://youtu.be/F5QIqFEDv2k?si=jvNoAiHmrv_iq-Lx">Here’s a video</a> on the main differences between Scrum and Kanban you can watch if you want more detail.</p>
<h2 id="heading-so-which-one-should-you-use-scrum-or-kanban"><strong>So which one should you use Scrum or Kanban?</strong></h2>
<p>So… which one should you use?</p>
<p>It really depends on your team, your product, and your pain points.</p>
<p>✔️ If you’re working on a brand-new product where requirements shift a lot, and your team thrives with structure and routines – Scrum is likely the better fit. Sprints give you a sense of pacing, and ceremonies help ensure alignment.</p>
<p>✔️ If you’re managing ongoing work like bug triage, tech debt, infrastructure tasks, or anything that’s more “whenever it comes in” than “we need to ship this in two weeks” – Kanban gives you flexibility and visibility without the overhead.</p>
<p>And yes, there’s such a thing as <strong>Scrumban</strong> – a hybrid approach where teams use visual boards and WIP limits from Kanban, but keep some of Scrum’s structure like standups and retros. It’s like Agile tapas: you get the flavors that work best for your appetite.</p>
<p><a target="_blank" href="https://youtu.be/kiI3IweyAeQ?si=M1mtS5HCCcGcT78J">Here is a detailed video</a> that’'ll teach you more about how Scrumban works in practice.</p>
<p>Watch the Scrumban video only when you are familiar and comfortable with both Scrum and Kanban – otherwise, you might get confused from the cross-pollination of ideas and frameworks.</p>
<p>I personally have never seen a Scrumban implementation thats scaled well – too many folks trying too many things and none of them work. But thats just based on my experience – it may work for you and your team. I’ll let you be the judge.</p>
<h2 id="heading-what-tools-do-teams-use-for-kanban"><strong>What Tools Do Teams Use for Kanban?</strong></h2>
<p>You’ve probably seen (or used) one already:</p>
<ul>
<li><p><strong>Trello</strong> – Simple and great for solo or small teams</p>
</li>
<li><p><strong>Jira</strong> – Enterprise-level, customizable workflows</p>
</li>
<li><p><strong>GitHub Projects</strong> – Lightweight but powerful for devs</p>
</li>
<li><p><strong>ClickUp / Asana / Notion</strong> – Integrated with docs/tasks</p>
</li>
</ul>
<p>Kanban isn’t tied to any one tool – you can use an app, a browser tab, or a whiteboard and a pack of sticky notes from the office supply closet. What matters is how you use it. But let’s walk through some of the most common tools and what they offer in a Kanban context:</p>
<h3 id="heading-trello">🟩 <strong>Trello</strong></h3>
<p>Trello is probably the easiest way to start with Kanban. It gives you a simple digital board with columns and cards you can drag and drop. It’s great for devs or small teams who don’t need tons of automation – just a clean place to track work visually.</p>
<h3 id="heading-jira">🟨 <strong>Jira</strong></h3>
<p>Jira is a heavyweight – and while it’s built for Scrum, it also supports robust Kanban boards. You can define custom workflows, use built-in reports like cumulative flow diagrams, enforce WIP limits, and manage team velocity. Ideal for large teams that need traceability, integrations, and permissions.</p>
<h3 id="heading-github-projects">🟦 <strong>GitHub Projects</strong></h3>
<p>If your code lives in GitHub, GitHub Projects is a clean way to stay close to your codebase. It lets you create Kanban-style boards with issues and pull requests as cards, so you’re never toggling between tools just to track what’s in progress.</p>
<h3 id="heading-clickup-asana-notion">🟧 <strong>ClickUp / Asana / Notion</strong></h3>
<p>These are all-in-one productivity platforms. They combine Kanban boards with documentation, team chat, calendars, and reporting. If your team needs more than just “move card left to right,” these tools let you manage projects, meetings, notes, and workflows in one place.</p>
<h3 id="heading-whiteboard-sticky-notes">🟪 <strong>Whiteboard + Sticky Notes</strong></h3>
<p>Don’t underestimate the analog approach. It’s fast. It’s visible. It’s tactile. Physically moving a task from “Doing” to “Done” gives you a sense of progress no digital tool can match. And when something’s blocked? Slap a red sticky on it and call it a day.</p>
<p>Bottom line: The best tool is the one your team will <em>actually</em> use. Fancy doesn’t beat consistent. And the actual tool doesn’t matter as much as the <strong>discipline</strong> your team has to actually use it.</p>
<h2 id="heading-how-to-use-kanban-to-manage-your-own-coding-projects"><strong>How to Use Kanban to Manage Your Own Coding Projects</strong></h2>
<p>Even if you're not on a team yet, Kanban is great for your own workflow. Here’s how you can use it to help yourself out:</p>
<ol>
<li><p>Create a basic 3-column board (To Do, In Progress, Done)</p>
</li>
<li><p>Write out every task, big or small</p>
</li>
<li><p>Set a WIP limit (for example, no more than 2 tasks at once)</p>
</li>
<li><p>Update it daily. Make it a ritual.</p>
</li>
<li><p>Review your flow weekly – What got stuck? What moved fast?</p>
</li>
</ol>
<p> Example:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>To-Do</strong></td><td><strong>In Progress</strong></td><td><strong>Done</strong></td></tr>
</thead>
<tbody>
<tr>
<td>Fix CSS Layout</td><td>Add blog search bar</td><td>Set up Netlify</td></tr>
<tr>
<td>Write README</td><td></td><td>Deploy v1</td></tr>
</tbody>
</table>
</div><p>You’ll be shocked how much clearer your thinking gets when you can <em>see</em> your work. It’s simple but super powerful to visualize your work it in this way.</p>
<h2 id="heading-final-thoughts-why-kanban-isnt-just-a-board"><strong>Final Thoughts: Why Kanban Isn’t Just a Board</strong></h2>
<p>Kanban isn’t just a tool – it’s a mindset.</p>
<p>It helps you focus. It helps your team collaborate. And it gives everyone – even non-technical folks – visibility into what’s going on.</p>
<p>If you’re learning to code and want to feel more confident working with others, <strong>learning Kanban is low-effort, high-impact</strong>.</p>
<p>So don’t wait until your first job. Start using it now – and show up to that standup with confidence.</p>
<p>I hope this small 101 Guide to Kanban was helpful to you all. My sole purpose to write this was to help beginner developers understand Kanban as a practical workflow system – especially for those transitioning from solo coding to collaborative, real-world development environments. It aims to demystify the methodology in a casual, beginner-friendly tone while still offering actionable guidance.</p>
<p>I hope you enjoyed my beginners guide to Kanban.</p>
<p>Until next time, keep Learning, Unlearning and Relearning, folks….</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ A Beginner Developer's Guide to Scrum ]]>
                </title>
                <description>
                    <![CDATA[ Let me guess: you’re learning to code…alone. You’ve been grinding through tutorials. You've built a portfolio site, maybe deployed a few projects on GitHub. And now you're trying to land a job or join a team. Then the interviews start. Suddenly, peop... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/a-beginner-developers-guide-to-scrum/</link>
                <guid isPermaLink="false">68813c7579e092b166d373b6</guid>
                
                    <category>
                        <![CDATA[ Scrum ]]>
                    </category>
                
                    <category>
                        <![CDATA[ agile development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ project management ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Developer ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ guide ]]>
                    </category>
                
                    <category>
                        <![CDATA[ education ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learning ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Product Management ]]>
                    </category>
                
                    <category>
                        <![CDATA[ software development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Data Science ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Career ]]>
                    </category>
                
                    <category>
                        <![CDATA[ workflow ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Aditya Vikram Kashyap ]]>
                </dc:creator>
                <pubDate>Wed, 23 Jul 2025 19:48:05 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1753300058064/7046dd6c-1d9e-4f06-9ca1-65b3bb7eec83.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Let me guess: you’re learning to code…alone.</p>
<p>You’ve been grinding through tutorials. You've built a portfolio site, maybe deployed a few projects on GitHub. And now you're trying to land a job or join a team.</p>
<p>Then the interviews start.</p>
<p>Suddenly, people ask:</p>
<ul>
<li><p>"Are you familiar with Agile?"</p>
</li>
<li><p>"Have you worked in a Scrum environment?"</p>
</li>
<li><p>"What’s your experience with sprints?"</p>
</li>
</ul>
<p>Cue the imposter syndrome. Because no one teaches this stuff in JavaScript 101.</p>
<p>This guide is for you.</p>
<p>I’ll help make the Scrum process – a very common way developers work together – <em>make actual sense</em>. I’ll walk you through the basics, but also tell you what developers actually <em>do</em>, how standups feel when you're new, and what’s expected of you when you’re no longer coding in a vacuum.</p>
<p>Let’s break it down.</p>
<h3 id="heading-heres-what-well-cover">Here’s what we’ll cover:</h3>
<ul>
<li><p><a class="post-section-overview" href="#heading-what-even-is-scrum">What Even Is Scrum?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-the-three-roles-in-scrum-and-who-does-what">The Three Roles in Scrum (and Who Does What)</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-the-scrum-rhythm-what-a-sprint-actually-looks-like">The Scrum Rhythm: What a Sprint Actually Looks Like</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-who-attends-the-ceremonies">Who attends the Ceremonies:</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-standups-where-you-talk-like-a-human-not-a-robot">Standups: Where You Talk Like a Human, Not a Robot</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-sprint-planning">Sprint Planning</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-whats-a-user-story-and-why-does-it-sound-like-a-childrens-book">What’s a User Story and Why Does It Sound Like a Children’s Book?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-counts-as-done-definition-of-done-and-why-its-important">What Counts as “Done”? Definition of Done and Why It’s Important</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-demos-retros-and-saying-the-hard-things">Demos, Retros, and Saying the Hard Things</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-tools-you-might-encounter">Tools You Might Encounter</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-if-youre-preparing-for-a-job-heres-what-you-can-do">If You’re Preparing for a Job, Here’s What You Can Do</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-final-thoughts">Final Thoughts</a></p>
</li>
</ul>
<h2 id="heading-what-even-is-scrum"><strong>What Even Is Scrum?</strong></h2>
<p>Scrum is not a tool. It’s not a software. It’s not some elite thing only PMs care about.</p>
<p>It’s a lightweight framework that helps software teams build things incrementally, together, in short focused cycles called sprints.</p>
<p>Scrum is used by everyone from FAANG teams to indie dev shops because it helps:</p>
<ul>
<li><p>Keep teams aligned</p>
</li>
<li><p>Deliver working software fast</p>
</li>
<li><p>Course-correct often</p>
</li>
<li><p>Spot problems early (before they go nuclear)</p>
</li>
</ul>
<p>It’s the opposite of the old-school “build for a year and pray it works” model.</p>
<h2 id="heading-the-three-roles-in-scrum-and-who-does-what"><strong>The Three Roles in Scrum (and Who Does What)</strong></h2>
<p>Scrum officially defines three roles. Here's what that means in practice:</p>
<h3 id="heading-1-product-owner-po"><strong>1. Product Owner (PO)</strong></h3>
<p>Think: Vision-holder. They decide <em>what</em> the team builds and <em>why</em>. A product owner:</p>
<ul>
<li><p>Writes user stories (think of these as feature requests written from a user’s point of view)</p>
</li>
<li><p>Prioritizes the work</p>
</li>
<li><p>Clarifies what success looks like</p>
</li>
<li><p>Says “yes” or “not yet” to features</p>
</li>
</ul>
<h3 id="heading-2-scrum-master-sm"><strong>2. Scrum Master (SM)</strong></h3>
<p>Think: Air-traffic controller meets therapist. They make sure the process works. The are master Facilitators, like between Dev and PO’s. A Scrum Master:</p>
<ul>
<li><p>Facilitates meetings</p>
</li>
<li><p>Removes blockers (“Your AWS access is stuck? I’ll escalate it.”)</p>
</li>
<li><p>Coaches the team on Scrum practices</p>
</li>
<li><p>Doesn’t manage people – manages <em>flow</em></p>
</li>
</ul>
<h3 id="heading-3-developers-you"><strong>3. Developers (YOU!)</strong></h3>
<p>Think: Builders. You write code, test it, ship it, fix it, and improve it. You also:</p>
<ul>
<li><p>Break down stories into tasks</p>
</li>
<li><p>Pick up work from the team board (like Jira or Trello)</p>
</li>
<li><p>Communicate progress</p>
</li>
<li><p>Demo what you’ve built at the end of the sprint</p>
</li>
</ul>
<p>You might also work with designers, testers, or DevOps folks – but within Scrum, you’re all “developers” building a product together.</p>
<h2 id="heading-the-scrum-rhythm-what-a-sprint-actually-looks-like"><strong>The Scrum Rhythm: What a Sprint Actually Looks Like</strong></h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752809790048/253fd92b-1ebe-4f3e-bfbc-48719676dc82.png" alt="253fd92b-1ebe-4f3e-bfbc-48719676dc82" class="image--center mx-auto" width="900" height="530" loading="lazy"></p>
<p>Image Source: <a target="_blank" href="https://www.invensislearning.com/blog/what-are-scrum-ceremonies/">https://www.invensislearning.com/blog/what-are-scrum-ceremonies/</a></p>
<h3 id="heading-understanding-the-scrum-cycle"><strong>Understanding the Scrum Cycle</strong></h3>
<p>So, what does it <em>actually</em> look like when a team uses Scrum to build software?</p>
<p>Let’s walk through a full sprint – not just the buzzwords, but what really happens when a group of humans tries to plan, build, review, and improve together. Think of this as your backstage pass to the rhythm of modern teamwork.</p>
<h3 id="heading-step-1-build-and-refine-the-product-backlog">📦 Step 1: Build and Refine the Product Backlog</h3>
<p>Before any coding starts, the team needs to agree on <em>what</em> they might build – not just this week, but in the near future too.</p>
<p>That’s where the <strong>Product Backlog</strong> comes in. This is a big, running list of everything the product might need – features, bug fixes, improvements, ideas, and maybe a few wild dreams. It’s like the wishlist for the product, but more organized (ideally).</p>
<p>The Product Owner is responsible for maintaining and prioritizing this list. They decide what’s most important to work on based on customer needs, business goals, and feedback.</p>
<p>But the PO doesn’t do this in isolation. Enter the <strong>Backlog Refinement meeting</strong>.</p>
<p>In these sessions, the Scrum Team – that’s the PO, the Scrum Master (SM), and the Developers – come together to:</p>
<ul>
<li><p><strong>Review</strong> the most important upcoming items</p>
</li>
<li><p><strong>Clarify</strong> any vague or confusing parts of each task</p>
</li>
<li><p><strong>Break big items</strong> down into smaller, buildable pieces called <strong>user stories</strong></p>
</li>
<li><p><strong>Estimate effort</strong> (how much time or complexity is involved for each story)</p>
</li>
</ul>
<p>This meeting makes sure the team isn’t caught off guard in the sprint – that they understand the work ahead and can actually start sprinting when the time comes.</p>
<h3 id="heading-step-2-sprint-planning-what-are-we-building-this-time">🧭 Step 2: Sprint Planning – What Are We Building This Time?</h3>
<p>Now that we’ve got a solid backlog, it’s time to pick what to build <em>right now</em>.</p>
<p>At the start of each sprint (which typically lasts 1 to 4 weeks), the team holds a <strong>Sprint Planning meeting</strong>. This meeting sets the stage for the entire sprint – it’s like the huddle before the big game.</p>
<p>In Sprint Planning, the team:</p>
<ul>
<li><p>Reviews the top items from the backlog</p>
</li>
<li><p>Discusses what can realistically be completed based on their availability and capacity</p>
</li>
<li><p>Chooses a handful of these stories to commit to</p>
</li>
<li><p><strong>Defines a Sprint Goal</strong> – a simple statement that captures the purpose of this sprint</p>
</li>
</ul>
<p>For example, the Sprint Goal might be:<br>🎯 <em>“Allow users to reset their passwords.”</em></p>
<p>Every user story chosen should contribute to that goal. The collection of these stories becomes the <strong>Sprint Backlog</strong> – basically, the to-do list for the sprint.</p>
<p>So when we say:</p>
<p>“The team selects an ordered list of user stories to comprise the Sprint Backlog for the next sprint, which will be achievable to satisfy the Sprint Goal...”</p>
<p>We’re really just saying:<br>👉 <em>“Pick a realistic number of important tasks that, if completed, will help us hit our target for the sprint.”</em></p>
<p>Not too vague. Not too ambitious. Just achievable and focused.</p>
<h3 id="heading-step-3-daily-standups-stay-in-sync">☀️ Step 3: Daily Standups – Stay in Sync</h3>
<p>Now the sprint is underway! But how does everyone stay aligned and avoid working in silos?</p>
<p>That’s where the <strong>Daily Standup</strong> comes in. Every day – usually in the morning – the team has a quick check-in (about 15 minutes) where each person answers three questions:</p>
<ol>
<li><p><strong>What did I do yesterday?</strong></p>
</li>
<li><p><strong>What am I working on today?</strong></p>
</li>
<li><p><strong>Is anything blocking me?</strong> (that is, am I stuck?)</p>
</li>
</ol>
<p>Example:</p>
<p>“Yesterday I set up the login API integration. Today I’ll work on the UI validation. I’m blocked on getting access to the staging database — may need help.”</p>
<p>These standups keep the team in sync and surface blockers early so they can be addressed quickly. They’re not about micromanaging or showing off. They’re about visibility and support.</p>
<h3 id="heading-whats-a-sprint-burndown-chart">📉 What’s a Sprint Burndown Chart?</h3>
<p>You might hear your team mention a “burndown chart.” No, this isn’t about things going down in flames (hopefully).</p>
<p>A <strong>Sprint Burndown Chart</strong> is a graph that shows how much work is left in the sprint – day by day.</p>
<ul>
<li><p>The <strong>y-axis</strong> is the amount of work remaining (often measured in story points or tasks)</p>
</li>
<li><p>The <strong>x-axis</strong> is the number of days left in the sprint</p>
</li>
</ul>
<p>The line should ideally trend downward as work gets completed – hence “burning down.” If it flattens out or slopes up, that’s a red flag that the team might be stuck, behind schedule, or not updating the board.</p>
<p>Think of it as a visual heartbeat of the sprint. You can learn more via a practical example <a target="_blank" href="https://youtu.be/2K84aZn9AY8?si=tS8oMGxVD0CYtnlw">in this video</a>.</p>
<h3 id="heading-step-4-sprint-review-show-what-youve-built">🖥️ Step 4: Sprint Review – Show What You’ve Built</h3>
<p>At the end of the sprint, the team holds a <strong>Sprint Review</strong> (also called a “demo”). This is where you show what was actually built during the sprint.</p>
<ul>
<li><p>The <strong>Developers</strong> demo working features – live, not just screenshots</p>
</li>
<li><p>The <strong>Product Owner</strong> reviews whether the Sprint Goal was achieved</p>
</li>
<li><p>Stakeholders may ask questions, give feedback, or suggest tweaks</p>
</li>
</ul>
<p>This meeting isn’t just for show – it’s a feedback loop. It helps the team validate that what they built is useful, usable, and meets expectations. If changes are needed, those get added to the backlog for future sprints.</p>
<h3 id="heading-step-5-sprint-retrospective-look-back-to-move-forward">🔍 Step 5: Sprint Retrospective – Look Back to Move Forward</h3>
<p>Once the review is done, the team shifts focus from <em>what</em> they built to <em>how</em> they worked together.</p>
<p>Enter the <strong>Sprint Retrospective</strong> – a meeting to reflect on the process, not the product.</p>
<p>The team discusses:</p>
<ul>
<li><p>✅ What went well</p>
</li>
<li><p>❌ What didn’t go so well</p>
</li>
<li><p>🔁 What could be improved next time</p>
</li>
</ul>
<p>This isn’t about pointing fingers. It’s about learning, adapting, and continuously improving how the team collaborates.</p>
<p>The <strong>Scrum Master</strong> often facilitates this meeting and helps turn feedback into action items for the next sprint. For example:</p>
<p>“We underestimated testing time. Next sprint, let’s budget for QA earlier.”</p>
<p>The best teams take retros seriously. Why? Because even if your code is perfect, your <em>process</em> needs tuning too – and small process changes often lead to big gains.</p>
<h3 id="heading-scrum-is-a-loop">♻️ Scrum Is a Loop</h3>
<p>Here’s the rhythm:</p>
<ol>
<li><p>Plan the sprint</p>
</li>
<li><p>Check in daily</p>
</li>
<li><p>Build and demo the product</p>
</li>
<li><p>Reflect and improve</p>
</li>
</ol>
<p>Then do it all over again – with slightly better coordination and slightly more trust each time.</p>
<p>It’s not about being fast. It’s about being intentional, consistent, and collaborative.</p>
<h3 id="heading-example-sprint">Example Sprint</h3>
<p>Let’s say, for example, that your team does 4-week sprints. (Keep in mind that Sprints can differ by team, nature of product, release cycles, and so on.)</p>
<p>Here’s the rough beat:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Week</strong></td><td><strong>What Happens (Sprint Ceremonies)</strong></td><td><strong>Your Role</strong></td></tr>
</thead>
<tbody>
<tr>
<td>1</td><td><strong>Sprint Planning</strong></td><td>Help estimate effort, pick what to build</td></tr>
<tr>
<td>1-4</td><td><strong>Daily Stand ups</strong> (15 mins)</td><td>Share what you’re doing &amp; any blockers</td></tr>
<tr>
<td>1-3</td><td><strong>Development Time</strong></td><td>Code, test, commit, fix, push, repeat</td></tr>
<tr>
<td>3.5-4</td><td><strong>Sprint Review</strong></td><td>Demo what you built</td></tr>
<tr>
<td>4</td><td><strong>Sprint Retrospective</strong></td><td>Reflect on how the sprint went as a team</td></tr>
</tbody>
</table>
</div><p>Scrum works in <strong>loops</strong>. Every 2-4 weeks (depending on your cadence and sprint cycle), your team should have working, demo-able software to show for it – even if it’s small.</p>
<p>And no, it’s not about “speed.” It’s about consistency, communication, and collaboration.</p>
<h2 id="heading-who-attends-the-ceremonies"><strong>Who attends the Ceremonies:</strong></h2>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Ceremony</strong></td><td><strong>Who Attends</strong></td><td><strong>Why They’re There</strong></td></tr>
</thead>
<tbody>
<tr>
<td><strong>Sprint Planning</strong></td><td>Product Owner (PO), Scrum Master (SM), Development Team</td><td>To define what will be delivered and how the work will be accomplished</td></tr>
<tr>
<td><strong>Daily Standup</strong></td><td>Development Team, Scrum Master (optional), PO (optional)</td><td>To sync on progress, share blockers, and coordinate efforts</td></tr>
<tr>
<td><strong>Sprint Review</strong></td><td>Development Team, Scrum Master, Product Owner, Stakeholders</td><td>To demo the work, get feedback, and assess if goals were met</td></tr>
<tr>
<td><strong>Sprint Retrospective</strong></td><td>Development Team, Scrum Master, Product Owner (optional)</td><td>To reflect on the process, identify what worked/what didn’t, and improve the next sprint</td></tr>
<tr>
<td><strong>Backlog Refinement</strong></td><td>Product Owner, Development Team, Scrum Master (optional)</td><td>To clarify upcoming stories, estimate work, and prepare for future sprint planning</td></tr>
</tbody>
</table>
</div><p>Now lets dive deeper and understand practically how each of these ceremonies work:</p>
<h2 id="heading-standups-where-you-talk-like-a-human-not-a-robot"><strong>Standups: Where You Talk Like a Human, Not a Robot</strong></h2>
<p>So how does the team actually stay connected day to day? That’s where standups come in.</p>
<p>Every morning, your team meets briefly – usually on Zoom or in a circle – and you answer 3 questions:</p>
<ol>
<li><p>What did I work on yesterday?</p>
</li>
<li><p>What will I work on today?</p>
</li>
<li><p>What’s blocking me? Any impediments?</p>
</li>
</ol>
<p>Example:</p>
<p>"Yesterday I cleaned up the signup validation logic. Today I’m working on the email verification flow. I’m stuck on SendGrid config – might need help setting up credentials."</p>
<p>It’s not about impressing anyone. It’s about keeping everyone in sync. Some days you’ll say, “I spent the whole day debugging a CSS bug that turned out to be a semicolon.” That’s okay.</p>
<p>How does it work?</p>
<p>The Scrum Master gathers everyone in a huddle room, the PO and Dev Team included, and opens the the Standup. They are the facilitator of the ceremony. Everyone gets a chance to answer the 3 questions above (usually about 2-5 minutes each). It’s not a full report – it’s quick. When one person is done, they pass it on to someone else.</p>
<p>This ensures there is team cohesion and transparency.</p>
<p><a target="_blank" href="https://youtu.be/q_R9wQY4G5I?si=W1AcvcLXB-mnUM1f">Here is a video example of a standup</a>.</p>
<h2 id="heading-sprint-planning"><strong>Sprint Planning</strong></h2>
<p>The goal of the planning meeting is to answer the questions “What are we going to work on, and how are we going to do it?” It is critical for the team to have a shared goal and a shared commitment to this goal before beginning this ceremony.</p>
<p>Participants should:</p>
<ul>
<li><p>Measure growth</p>
</li>
<li><p>Sync with the Scrum Master</p>
</li>
<li><p>Sync with the Product Owner</p>
</li>
</ul>
<p>Sprint planning happens just before the sprint starts, and usually lasts for an hour or two. In this meeting, the team goes over a collection of <strong>user stories</strong> and discuss, plan, measure, and prioritize. This is where they decide what is going to be in scope for their upcoming sprint cycle.</p>
<p>The Product Owner will have a prioritized view of things in the backlog. They work with the team on each object or customer experience. Together, as a group they go through and make calculations, deciding to what they can commit.</p>
<h2 id="heading-whats-a-user-story-and-why-does-it-sound-like-a-childrens-book"><strong>What’s a User Story and Why Does It Sound Like a Children’s Book?</strong></h2>
<p>So you might be wondering: how do you know what to work on? What to build? So much work, so little time? Thats where <strong>user stories</strong> come in.</p>
<p>In Scrum, teams don’t just write vague tasks like “code the login.” Instead, they write user stories – short, human-centered feature descriptions that describe what the user needs, why they need it, and what success looks like.</p>
<p>Here’s an example:</p>
<p><em>As a user, I want to be able to reset my password, so I can access my account if I forget it.</em></p>
<p>User stories are the scaffolding of teamwork. They’re written with empathy, not just efficiency. And each one comes with <strong>acceptance criteria</strong> – a checklist that clarifies what “done” actually means:</p>
<ul>
<li><p>A “Forgot Password” link is visible</p>
</li>
<li><p>Clicking it shows a form</p>
</li>
<li><p>An email gets sent with a reset link</p>
</li>
</ul>
<p>Once a story is agreed upon, developers break it down into tasks, like “build form,” “hook into backend,” or “handle email validation.” It’s collaborative, not prescriptive. And user stories have priority so you know what’s the most important and what’s the least.</p>
<p>A helpful rule of thumb many teams use is the <a target="_blank" href="https://medium.com/@nic/writing-user-stories-with-gherkin-dda63461b1d2"><strong>Gherkin</strong>-style "Given–When–Then"</a> format:</p>
<ul>
<li><p><strong>Given</strong> some initial context</p>
</li>
<li><p><strong>When</strong> an event occurs</p>
</li>
<li><p><strong>Then</strong> a specific outcome should happen</p>
</li>
</ul>
<p>This ensures that everyone – devs, testers, and product owners – shares the same understanding of behavior and expectations.</p>
<p><a target="_blank" href="https://www.youtube.com/watch?v=7hoGqhb6qAs">Here is a great video example</a> thats outlines how to draft effective and powerful user stories.</p>
<h2 id="heading-what-counts-as-done-definition-of-done-and-why-its-important"><strong>What Counts as “Done”? Definition of Done and Why It’s Important</strong></h2>
<p>Now you might be wondering – how do I know when a task is done and can be closed out?</p>
<p>The <strong>Definition of Done</strong> is a type of documentation in the form of a <strong>team agreement</strong>. The Definition of Done identifies the conditions that need to be achieved in order for the product to be considered done (as in <strong>potentially shippable</strong>).</p>
<p>This is how we know that we "did the thing right". Meaning, we built the correct level of quality into the product. The Definition of Done is not the same as the acceptance criteria, which are written by the product owner to help us know we did the "right thing".</p>
<p>Every team has a Definition of Done – it’s not just “I pushed code.” It could mean:</p>
<ul>
<li><p>Code is written</p>
</li>
<li><p>Reviewed by a peer</p>
</li>
<li><p>Merged into main</p>
</li>
<li><p>Tested on staging</p>
</li>
<li><p>Possibly deployed</p>
</li>
</ul>
<p>This clarity keeps teams honest and accountable. No “it works on my machine” energy here. The DoD sets a quality bar. It prevents ambiguity, rework, and “it works on my machine” moments. When every card on the board passes the same finish line, teams move faster – and trust each other more.</p>
<p>Everyone should know what done is in a team. Either its Done as per DoD standards or its not.</p>
<p><a target="_blank" href="https://youtu.be/pYOJyQoBT3U?si=nVygkQQx79NaAOo4">Here is a beautiful video</a> highlighting the impotence of DoD.</p>
<h2 id="heading-demos-retros-and-saying-the-hard-things"><strong>Demos, Retros, and Saying the Hard Things</strong></h2>
<p>Once you’ve built the product, then comes demos (showcasing your work) and retros (analysis as a team on what when well and what areas to improve on).</p>
<p>In the retro, everyone’s encouraged to speak up:</p>
<ul>
<li><p>What went well?</p>
</li>
<li><p>What didn’t?</p>
</li>
<li><p>What should we try next time?</p>
</li>
</ul>
<p>Example:</p>
<p>“We missed a lot of stories because we didn’t account for testing time. Maybe we buffer next sprint with fewer tasks.”</p>
<p>The goal is not to blame – it’s to <em>improve</em>. Over time, this feedback loop becomes gold. The Scrum Master usually facilitates, collects feedback (via tools like Parabol, Miro, or sticky notes), and helps turn insights into actionable experiments for the next sprint.</p>
<p>Over time, retros become the heartbeat of team evolution.</p>
<p><a target="_blank" href="https://youtu.be/5eu1HotNmWs?si=1DZaSmztB6rHyawj">Here is a video</a> highlighting the importance of a Retro and Sprint Review.</p>
<h3 id="heading-why-retrospection-matters-more-than-you-think">🧠 Why Retrospection Matters More Than You Think</h3>
<p>The Sprint Retrospective is more than just another meeting. It’s a mirror for your team – a safe, structured space to pause, reflect, and improve together.</p>
<p>You discuss:</p>
<p>✅ what went well</p>
<p>❌ what did not go well</p>
<p>🔁 what could we do better next time</p>
<p>Great teams don't just deliver great software, they continually deliver better ways of working.</p>
<p>This is why many experienced Scrum practitioners consider the retro to be the most important event in Scrum. Code is deployed once, but process improvements grow exponentially, sprint after sprint.</p>
<h2 id="heading-tools-you-might-encounter"><strong>Tools You Might Encounter</strong></h2>
<p>Scrum doesn’t require software, but real-world teams use a variety of tools:</p>
<ul>
<li><p><strong>Jira</strong> – Tracks sprints, issues, velocity</p>
</li>
<li><p><strong>Trello</strong> – Simple board, good for small teams</p>
</li>
<li><p><strong>Slack</strong> – Where standups often happen if async</p>
</li>
<li><p><strong>Notion / Confluence</strong> – Docs, retros, notes</p>
</li>
<li><p><strong>GitHub Projects</strong> – Lightweight planning for devs</p>
</li>
</ul>
<p>Don’t worry if you’re not fluent in these yet. They’re tools – you’ll learn them on the job.</p>
<h2 id="heading-if-youre-preparing-for-a-job-heres-what-you-can-do"><strong>If You’re Preparing for a Job, Here’s What You Can Do</strong></h2>
<ul>
<li><p>✍️ Practice writing user stories from your side projects</p>
</li>
<li><p>🧪 Run a mini-sprint: Plan your weekend project, set goals, and “review” it at the end</p>
</li>
<li><p>🤝 Contribute to an open-source project that uses Scrum or Agile workflows</p>
</li>
<li><p>🧾 Write about what you learned – maybe as a tutorial (<em>hint hint</em>)</p>
</li>
</ul>
<h2 id="heading-final-thoughts"><strong>Final Thoughts</strong></h2>
<p>So to recap, Scrum is a simple yet powerful way for teams to work together, stay organized, and deliver results quickly. It runs in short cycles called <strong>sprints</strong>, where the team plans what to do, checks in daily, shows their progress at the end, and reflects on how to improve.</p>
<p>The four key ceremonies – <strong>Sprint Planning</strong>, <strong>Daily Scrum</strong>, <strong>Sprint Review</strong>, and <strong>Sprint Retrospective</strong> – help keep everyone aligned and focused. With clear roles and regular feedback, Scrum makes it easier to handle changes, solve problems early, and continuously get better as a team.</p>
<p>But scrum isn’t a magic spell. It’s just a way for humans to build complex things – together – without falling apart.</p>
<p>You don’t need to be a Scrum Master. You don’t need a certification. But if you understand how sprints work, what’s expected of you, and how to show up to meetings with clarity and candor, you’re 10 steps ahead of most.</p>
<p>Scrum helps teams talk, plan, build, and learn. And now? You can too.</p>
<p>If you liked this, please do share. You never know who it might help out.</p>
<p>Until then…keep learning, unlearning, and relearning!!!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Prepare for your iOS interview ]]>
                </title>
                <description>
                    <![CDATA[ Preparing for an iOS developer interview can be a daunting task, especially when you're trying to master both conceptual questions and practical coding challenges. Whether you're just starting your iOS development journey or gearing up for your next ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/prepare-for-your-ios-interview/</link>
                <guid isPermaLink="false">681d1bbfb1018a470d0d8a02</guid>
                
                    <category>
                        <![CDATA[ iOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ youtube ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Beau Carnes ]]>
                </dc:creator>
                <pubDate>Thu, 08 May 2025 21:01:51 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1746737982577/1c47e446-ea9d-4e63-a54d-55c6d49e0b53.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Preparing for an iOS developer interview can be a daunting task, especially when you're trying to master both conceptual questions and practical coding challenges. Whether you're just starting your iOS development journey or gearing up for your next big career move, understanding the most commonly asked interview questions and knowing how to answer them effectively can give you a major advantage.</p>
<p>We just published a course on the <a target="_blank" href="http://freeCodeCamp.org">freeCodeCamp.org</a> YouTube channel that will teach you all about the top 10 most frequently asked iOS interview questions, complete with sample answers and code demonstrations. Presented by Richard Topchii, this mock interview format course features Daniel as the interviewer and covers everything from foundational concepts to nuanced language features in Swift.</p>
<p>The course kicks off with an overview and a discussion of why these specific questions were chosen, followed by a deep dive into essential iOS concepts like the View Controller life cycle, and the differences between structs and classes, which is a crucial topic for understanding memory management and data handling in Swift. You’ll also learn the distinctions between <code>.frame</code> and <code>.bounds</code> in UIViews, an area where developers are often tested for their understanding of layout behavior.</p>
<p>Beyond the fundamentals, the course explores more advanced topics such as Protocol-Oriented Programming, MVC architecture, and important Swift keywords like <code>lazy</code>, <code>weak</code>, <code>unowned</code>, and <code>@escaping</code>. These are often tricky areas that interviewers use to assess a candidate's depth of knowledge and real-world coding experience. Plus, with real coding questions on the <code>defer</code> statement and GCD / <code>DispatchQueue</code>, you'll get to see how to write performant and safe concurrent code.</p>
<p>By the end of the video, you’ll also get a summary and feedback section that ties all the concepts together, helping reinforce what you've learned. Watch the full course on <a target="_blank" href="https://youtu.be/SLIlyAy-aZs">the freeCodeCamp.org YouTube channel</a> (1-hour watch).</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/SLIlyAy-aZs" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Prepare for Technical Interviews Using Neetcode 150 ]]>
                </title>
                <description>
                    <![CDATA[ Technical interviews can be intimidating, especially when you're preparing for roles at top tech companies. To succeed, you need a solid grasp of algorithms, data structures, and problem-solving strategies. The NeetCode 150 is an invaluable resource—... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/prepare-for-technical-interviews-using-neetcode-150/</link>
                <guid isPermaLink="false">67912f406a65d8a9c9ef9f7e</guid>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ youtube ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Beau Carnes ]]>
                </dc:creator>
                <pubDate>Tue, 21 Jan 2025 05:00:00 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1737567904804/e1f89c98-9264-40e4-8183-f230b2bac811.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Technical interviews can be intimidating, especially when you're preparing for roles at top tech companies. To succeed, you need a solid grasp of algorithms, data structures, and problem-solving strategies.</p>
<p>The NeetCode 150 is an invaluable resource—a curated list of the most essential LeetCode problems that cover key algorithmic patterns and topics frequently tested in interviews.</p>
<p>We just published a course on the freeCodeCamp.org YouTube channel, created by <strong>@DestinationFAANG</strong>, that dives deep into the <strong>NeetCode 150</strong>. This course provides a comprehensive walkthrough of these problems, offering detailed explanations, practical solutions, and tips for tackling each challenge effectively.</p>
<h3 id="heading-whats-in-the-course">What’s in the Course?</h3>
<p>The course spans over <strong>38 hours</strong> of in-depth content, meticulously covering the NeetCode 150 problems. Each problem is explained step-by-step, ensuring that even beginners can follow along. Here's what you can expect:</p>
<ul>
<li><p><strong>Key Topics and Patterns:</strong> Problems are grouped by topics such as arrays, strings, linked lists, binary trees, dynamic programming, and graph algorithms. This structured approach helps you build a comprehensive understanding of the key concepts.</p>
</li>
<li><p><strong>Detailed Solutions:</strong> Every problem includes a clear explanation of the logic, coding implementation (in Java), and optimization techniques to solve it efficiently.</p>
</li>
<li><p><strong>Real-World Relevance:</strong> These problems are selected based on their frequency in actual tech interviews, ensuring that your preparation is targeted and practical.</p>
</li>
</ul>
<h3 id="heading-course-highlights">Course Highlights</h3>
<ul>
<li><p><strong>Introduction and Foundations:</strong> The course begins with simpler problems like "Contains Duplicate" and "Valid Anagram" to establish a strong base.</p>
</li>
<li><p><strong>Advanced Concepts:</strong> As you progress, you’ll encounter more challenging problems like "Trapping Rain Water," "Word Search II," and "Binary Tree Maximum Path Sum."</p>
</li>
<li><p><strong>Dynamic Programming:</strong> Learn to tackle problems like "Longest Increasing Subsequence" and "Coin Change," which are essential for mastering this fundamental topic.</p>
</li>
<li><p><strong>Graphs and Trees:</strong> Deep dive into graph algorithms with problems like "Course Schedule," "Alien Dictionary," and "Network Delay Time," as well as tree-based challenges like "Binary Tree Level Order Traversal."</p>
</li>
<li><p><strong>Practical Coding Tips:</strong> The course emphasizes clean, efficient coding practices that are crucial for interview success.</p>
</li>
</ul>
<h3 id="heading-why-watch-this-course">Why Watch This Course?</h3>
<p>Whether you’re a beginner looking to break into the tech industry or an experienced developer refining your skills, this course is designed to meet your needs. It’s free, accessible, and offers high-quality guidance on solving some of the most critical technical interview problems.</p>
<p>Watch it now on <a target="_blank" href="https://youtu.be/T0u5nwSA0w0">freeCodeCamp.org’s YouTube channel</a> (38-hour watch).</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/T0u5nwSA0w0" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to get a FAANG Dev Job in your 40s with Coding Interview University creator John Washam [#134] ]]>
                </title>
                <description>
                    <![CDATA[ On this week's episode of the podcast, I interview John Washam, a software engineer at Amazon. John's also creator of one of the most popular open source projects of all time, Coding Interview University. This is John's first-ever podcast interview, ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-john-washam-crammed-for-8-months-got-a-job-at-amazon-then-taught-1000s-of-other-devs-134/</link>
                <guid isPermaLink="false">66a3b1c9cb3df5b440c71d56</guid>
                
                    <category>
                        <![CDATA[ podcast ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learn to code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Quincy Larson ]]>
                </dc:creator>
                <pubDate>Fri, 26 Jul 2024 14:25:13 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1722003876140/020d65a7-c3d0-4927-8b45-326f9766edaf.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>On this week's episode of the podcast, I interview John Washam, a software engineer at Amazon. John's also creator of one of the most popular open source projects of all time, Coding Interview University.</p>
<p>This is John's first-ever podcast interview, and the first time he's told his story. Interviewing him was an absolute honor.</p>
<p>We talk about:</p>
<ul>
<li><p>How John delivered pizzas to save enough money to buy his first computer in the 90s. "I was tired of being a broke kid."</p>
</li>
<li><p>John's first career in the US military, where he worked as a translator in South Korea</p>
</li>
<li><p>How John crammed Computer Science for 8 months and taught himself enough theory and coding skills to get a job in big tech, then published Coding Interview University on GitHub</p>
</li>
<li><p>What it's like to work as a senior developer at a big tech company, and what you can expect the journey to be like</p>
</li>
</ul>
<p>Can you guess what song I'm playing on my bass during the intro? It's from a 1986 rock song.</p>
<p>Also, I want to thank the 9,779 kind people who support our charity each month, and who make this podcast possible. You can join them and support our mission at: <a target="_blank" href="https://www.freecodecamp.org/donate">https://www.freecodecamp.org/donate</a></p>
<p>You can watch the interview on YouTube:</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/B-QBZrkD06U" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p> </p>
<p>Or you can listen to the podcast in Apple Podcasts, Spotify, or your favorite podcast app. Be sure to follow the freeCodeCamp Podcast there so you'll get new episodes each Friday.</p>
<p>Links we talk about during our conversation:</p>
<ul>
<li><p>Coding Interview University: <a target="_blank" href="https://github.com/jwasham/coding-interview-university">https://github.com/jwasham/coding-interview-university</a></p>
</li>
<li><p>The Starup Next Door, John's blog: <a target="_blank" href="https://startupnextdoor.com/">https://startupnextdoor.com/</a></p>
</li>
<li><p>The Talent Code, the book John recommends: <a target="_blank" href="https://www.amazon.com/Talent-Code-Greatness-Born-Grown/dp/055380684X">https://www.amazon.com/Talent-Code-Greatness-Born-Grown/dp/055380684X</a></p>
</li>
<li><p>Follow John on LinkedIn: <a target="_blank" href="https://www.linkedin.com/in/johnawasham/">https://www.linkedin.com/in/johnawasham/</a></p>
</li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ JavaScript Coding Interview Practice – Sample Interview Questions and Solutions ]]>
                </title>
                <description>
                    <![CDATA[ By Damla Erkiner David Goggins is an ultramarathon runner, a public speaker, a retired navy SEAL, and the author of the book 'Can't Hurt Me: Master Your Mind and Defy the Odds'. He's one of my role models because of his physical strength and mental r... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/javascript-coding-interview-practice/</link>
                <guid isPermaLink="false">66d45e01d1ffc3d3eb89dda9</guid>
                
                    <category>
                        <![CDATA[ coding interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview questions ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 31 Aug 2022 17:39:28 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/08/david-goggins-quotes-about-hard-work.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Damla Erkiner</p>
<p>David Goggins is an ultramarathon runner, a public speaker, a retired navy SEAL, and the author of the book '<a target="_blank" href="https://www.amazon.com/Cant-Hurt-Me-Master-Your/dp/1544512287"><strong>Can't Hurt Me: Master Your Mind and Defy the Odds</strong></a>'. He's one of my role models because of his physical strength and mental resilience. </p>
<p>You might say: "Wait a second! We get it. This person is obviously the epitome of success. But he has non-technical skills. So why is he relevant to JavaScript coding interviews?" </p>
<p>Well, if you're ready, let's explore this together.</p>
<h3 id="heading-rocky-balboa-as-a-mentor">Rocky Balboa As a Mentor</h3>
<p>In response to a question, David says, 'The Rocky Movie changed my life." In <a target="_blank" href="https://www.youtube.com/watch?v=dse1afiGbx4&amp;t=193s">that pep talk</a>, he refers to <a target="_blank" href="https://www.youtube.com/watch?v=25NmudB2fqg">this scene</a> (min 1.30-1.42) where the fictional character, Rocky - despite being beaten up badly by his opponent in the final boxing round - refuses to give up no matter what. </p>
<p>David describes that particular moment as the time when Rocky - initially depicted as an underdog by the screenwriter - overcomes all the odds and strikes awe in his rival.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-280.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.amazon.com/Eye-Tiger-Rocky/dp/B004GY1FTQ">Illustration Source</a></em></p>
<p>Let's admit it. Being a good programmer is not that easy. And especially if you are at the beginning of your career, technical job interviews can be seriously daunting. In short, it might be nice to reach David's (and Rocky's) mindset. </p>
<p>With that kind of drive and confidence, you're much less likely to consider giving up regardless of the types of challenges you face in your wonderful yet difficult journey of getting a developer job.</p>
<h2 id="heading-why-coding-interviews-are-difficult">Why Coding Interviews Are Difficult</h2>
<p>During coding interviews, you are expected to fix coding problems with some theoretical knowledge. But the caveat is you must do that in real time, which sometimes scares new developers off. </p>
<p>There are several types of coding interviews. But the most challenging one is probably a whiteboard interview. In these types of interviews, you have to code in front of a future employer / a senior software developer.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-319.png" alt="Image" width="600" height="400" loading="lazy">
<em>[Illustration by HackerRank](https://www.hackerrank.com/blog/virtual-whiteboarding-for-system-design-interviews/"&gt;&lt;nr-sentence class="nr-s20" id="nr-s20" page="0)</em></p>
<p>These interviews can be extra stressful because you are typically not allowed to have a computer to google any unknown concepts or to get some code snippets from the internet. You are only given a marker to solve the question on a whiteboard as the name suggests.</p>
<h3 id="heading-do-interviews-reflect-what-youll-do-in-your-job">Do Interviews Reflect What You'll Do in Your Job?</h3>
<p>Not necessarily. So why are they holding these scary coding interviews? Well, the reason is to test your problem solving skills in general. At times, finding the correct answer may not even be that important. </p>
<p>What matters is how you reach that conclusion / solution and which algorithms you prefer to use along the way. In other words, your ability to function well under stress is being tested by tech companies. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-329.png" alt="Image" width="600" height="400" loading="lazy">
_[Image Source](https://www.reddit.com/r/ProgrammerHumor/comments/l6wnvt/interview_vs<em>job/"&gt;&lt;nr-sentence class="nr-s30" id="nr-s30" page="0)</em></p>
<p>Let's face it. You'll come across lots of stressful situations in your future job, and how you deal with certain issues is especially crucial. Therefore, your future employer naturally wants to witness firsthand whether you are the right fit for the job. </p>
<h2 id="heading-what-is-the-purpose-of-this-tutorial">What is the Purpose of This Tutorial?</h2>
<p>In this post, I'll walk you through some popular JavaScript interview concepts through examples. I'll also do my best to show you what recruiters / interviewers might actually be looking for in a candidate while they code in front of them. </p>
<p>To simply put, we'll examine some models and try to solve the related puzzles together. </p>
<p>By the end of this tutorial, you'll hopefully have an idea about a number of important array methods. But most importantly, you'll unlock how to approach some coding challenges in the best way possible.</p>
<h2 id="heading-what-exactly-is-the-memory-palace-method">What Exactly is the Memory Palace Method?</h2>
<p>Before we start, just be aware that in the sample data down below, I've used some late celebrities' names intentionally so that all those details can be catchy in the long run. </p>
<p>An ancient technique called <a target="_blank" href="https://www.wired.co.uk/article/memory-palace-technique-explained">the Memory Palace</a> clearly says that the weirder the details, the easier it is to remember them – and a made-up story / creating context is even more effective. </p>
<p>If you try to visualise the related situation vividly and associate the given programming concepts with some bizarre details in your mind, you might feel less stressed and confused when you see a similar problem next time. This is because it might be easier for you to create specific links and as such remember things easily. This is how our brains work. </p>
<p>Well, even the fictional figure '<a target="_blank" href="https://www.smithsonianmag.com/arts-culture/secrets-sherlocks-mind-palace-180949567/">Sherlock Holmes</a>', the smartest guy on the planet, benefits from this method when solving complicated crimes – so why shouldn't we?</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-321.png" alt="Image" width="600" height="400" loading="lazy">
<em>[Illustration by Savanahcat](https://www.deviantart.com/savanahcat/art/Mind-Palace-387601041"&gt;&lt;nr-sentence class="nr-s43" id="nr-s43" page="0)</em></p>
<h2 id="heading-how-to-approach-coding-problems">How to Approach Coding Problems</h2>
<p>In our imaginary interview, you'll see that four extraordinary musicians from the past are listed as passengers on a flight. We have their food choices and the number of connecting flights they need to take after their incredible performances on stage in different parts of the world.</p>
<p>Let's say just for the sake of argument our phenomenal figures (Freddie Mercury, Amy Winehouse, Kurt Cobain, and Michael Jackson) are about to fly from different destinations to Los Angeles just to be able to dine out together at a swanky restaurant, as they enjoy each other's company so much. </p>
<p>After all, this is our own private memory palace, so we can absolutely do whatever we want to do in our minds. Remember unusual details will stick better. That's why I'm trying to add more to spice things up. </p>
<p>This method explicitly suggests describing every single detail with some vivid adjectives so that you can associate them with the things you plan to learn in the long run. </p>
<p><a target="_blank" href="https://www.medicalnewstoday.com/articles/memory-loss#:~:text=Short%2Dterm%20memory%20is%20the,from%20a%20longer%20time%20ago.">Scientists</a> say short term memory and long term memory function very differently. To put it simply, we need a way to put all those core concepts (not necessarily the syntax) about programming in our long term memory. That's why it can be nice to benefit from the memory palace method in our journey.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-326.png" alt="Image" width="600" height="400" loading="lazy">
<em>[Image Source](https://www.nme.com/news/music/producer-goes-viral-for-mixing-nirvana-and-michael-jackson-songs-with-drill-beats-2747204"&gt;&lt;nr-sentence class="nr-s56" id="nr-s56" page="0)</em></p>
<p>Plus, I feel like you get to picture this unusual scenario with a smile on your face. Well, wouldn't it be great if these awesome souls could have seen that they are now helping us / the programming community as the guests of a freeCodeCamp article? </p>
<h3 id="heading-sample-interview-questions">Sample Interview Questions</h3>
<p>Let's get back to the real life now though. Remember you're still in the interview and as you see below, three questions in a row are waiting for you.</p>
<pre><code class="lang-js">
<span class="hljs-comment">// Main Question: Get the passengers' names using the data provided </span>
<span class="hljs-comment">// Bonus Part (a)- Return vegetarians/vegans</span>
<span class="hljs-comment">// Bonus Part (b)- Sort passengers by the number of connected flights in descending order</span>
</code></pre>
<h3 id="heading-the-data">The Data</h3>
<p>To solve the puzzles, you're expected to use the data inside the following array of objects in practical ways. </p>
<p>You'll certainly need to come up with the right algorithms and try to find the most effective solution that can satisfy the interviewer. </p>
<pre><code class="lang-js">
<span class="hljs-keyword">const</span> passengers = [
  {
    <span class="hljs-attr">id</span>: <span class="hljs-number">1</span>,
    <span class="hljs-attr">passengerName</span>: <span class="hljs-string">"Freddie Mercury"</span>,
    <span class="hljs-attr">isVegetarianOrVegan</span>: <span class="hljs-literal">false</span>,
    <span class="hljs-attr">connectedFlights</span>: <span class="hljs-number">2</span>,
  },
  {
    <span class="hljs-attr">id</span>: <span class="hljs-number">2</span>,
    <span class="hljs-attr">passengerName</span>: <span class="hljs-string">"Amy Winehouse"</span>,
    <span class="hljs-attr">isVegetarianOrVegan</span>: <span class="hljs-literal">true</span>,
    <span class="hljs-attr">connectedFlights</span>: <span class="hljs-number">4</span>,
  },
    {
    <span class="hljs-attr">id</span>: <span class="hljs-number">3</span>,
    <span class="hljs-attr">passengerName</span>: <span class="hljs-string">"Kurt Cobain"</span>,
    <span class="hljs-attr">isVegetarianOrVegan</span>: <span class="hljs-literal">true</span>,
    <span class="hljs-attr">connectedFlights</span>: <span class="hljs-number">3</span>,
  },
     {
    <span class="hljs-attr">id</span>: <span class="hljs-number">3</span>,
    <span class="hljs-attr">passengerName</span>: <span class="hljs-string">"Michael Jackson"</span>,
    <span class="hljs-attr">isVegetarianOrVegan</span>: <span class="hljs-literal">true</span>,
    <span class="hljs-attr">connectedFlights</span>: <span class="hljs-number">1</span>,
  },
];
</code></pre>
<p>The above questions are in fact not that hard. But, how we'll handle them is a great opportunity to compare alternative solutions for a single problem. At the end of the day, quality is what counts for recruiters / interviewers. </p>
<h3 id="heading-interview-question-1-how-to-get-passengers-names">Interview Question 1: How to Get Passengers' Names</h3>
<p>Let's get the passengers' names as requested. The first solution is through a <a target="_blank" href="https://www.freecodecamp.org/news/javascript-for-loop-how-to-loop-through-an-array-in-js/">'for loop'</a> method. So we first need to use an empty array to push the passengers' names right inside it at the end of the loop. </p>
<p>Below, <code>[i]</code> represents the current passenger and we simply loop through the 'passengers' array to access the names of the passengers. Then, we need to lock them up in our empty array / passengerNames.</p>
<pre><code class="lang-js">
<span class="hljs-keyword">const</span> passengerNames = [];
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> i = <span class="hljs-number">0</span>; i &lt; passengers.length; i++) {
    passengerNames.push(passengers[i].passengerName)
}
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">"passengers"</span>, passengerNames);
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-331.png" alt="Image" width="600" height="400" loading="lazy">
<em>RESULT - using 'for loop'</em></p>
<p>Alright, we solved the puzzle, but is it enough? Or might the interviewers expect you to come up with a better solution?</p>
<h3 id="heading-alternative-solution-1">Alternative Solution #1:</h3>
<p>We can reach the desired result by using the '<a target="_blank" href="https://www.freecodecamp.org/news/javascript-foreach-how-to-loop-through-an-array-in-js/">forEach</a>' function as well. This solution is even a bit better than the previous one because there is no index expression in this one. </p>
<pre><code class="lang-js">
<span class="hljs-keyword">const</span> passengerNames = [];
passengers.forEach(<span class="hljs-function">(<span class="hljs-params">passenger</span>) =&gt;</span> {
    passengerNames.push(passenger.passengerName);
})
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-332.png" alt="Image" width="600" height="400" loading="lazy">
<em>RESULT - using 'forEach'</em></p>
<p>To benefit from 'forEach', we need <a target="_blank" href="https://www.freecodecamp.org/news/what-is-a-callback-function-in-javascript-js-callbacks-example-tutorial/">a callback function</a>. With this arrangement, we are able to reach every passenger in the list. However, just like in the previous solution, we first need an empty array to push the items / passengers' names. </p>
<p>Even though the result is the same, this piece of code is shorter. Writing neater codes is what is – in fact – expected from you. </p>
<p>In other words, not only the solution matters, but also how you reach it is being evaluated by the recruiters. For this reason, it is a good idea to plan your action rather than writing the first idea in your mind on the whiteboard.</p>
<h3 id="heading-alternative-solution-2">Alternative Solution 2:</h3>
<p>Here comes the best solution. We can also utilise the '<a target="_blank" href="https://www.freecodecamp.org/news/javascript-map-how-to-use-the-js-map-function-array-method/">map</a>' function to tackle the same problem. Let's see how.</p>
<pre><code class="lang-js">
<span class="hljs-keyword">const</span> passengerNames = passengers.map(<span class="hljs-function">(<span class="hljs-params">passenger</span>) =&gt;</span> passenger.passengerName);
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-333.png" alt="Image" width="600" height="400" loading="lazy">
<em>RESULT - using 'map'</em></p>
<p>The map function also loops through the array and returns a new array for every item in the list. With this set-up, we simply return a single element, not an object. </p>
<p>The result will again be the same in the console, but your code will even be better than the first and second one because this time, we don't need to create an empty array before the actual task. </p>
<p>Here is the food for thought on this topic. Those who say 'less is more' have a point when it comes to writing codes. </p>
<h3 id="heading-interview-question-2-how-to-get-vegetarianvegan-singers">Interview Question 2: How to Get Vegetarian/Vegan Singers</h3>
<p>Let's now take a look at the next challenge. The new task asks us to obtain only the vegetarian / vegan singers from the passengers' list by also keeping the first argument in the main question section. </p>
<h3 id="heading-how-to-solve-with-a-for-loop">How to Solve With a 'For Loop'</h3>
<p>Again, we can use the same old 'for loop' for this one as well. All we need to do is to check whether there are any vegetarian / vegan singers in our passenger list through an 'if' statement inside our existing function.</p>
<pre><code class="lang-js">
<span class="hljs-keyword">const</span> passengerNames = [];
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> i = <span class="hljs-number">0</span>; i &lt; passengers.length; i++) {
    <span class="hljs-keyword">if</span>(passengers[i].isVegetarianOrVegan) {
    passengerNames.push(passengers[i].passengerName)
    }
}
<span class="hljs-built_in">console</span>.log(passengerNames);
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-334.png" alt="Image" width="600" height="400" loading="lazy">
<em>RESULT - using 'for loop'</em></p>
<p>We do that with the <code>isVegetarianOrVegan</code> property in our object. Basically, what we say is this: if the relevant statement is true (if there are any vegan / vegetarian passengers in the list), just push those items into our new array. The result will give us three singers' names as those are listed as  'vegetarian or vegan' in the data part. </p>
<h3 id="heading-how-to-solve-with-foreach">How to Solve with 'forEach'</h3>
<p>As a matter of fact, the 'forEach' function handles the problem similarly. But once again, it has too many lines of codes as you see below, so it isn't the ideal version. </p>
<pre><code class="lang-js">
<span class="hljs-keyword">const</span> passengerNames = [];
passengers.forEach(<span class="hljs-function">(<span class="hljs-params">passenger</span>) =&gt;</span> {
      <span class="hljs-keyword">if</span> (passenger.isVegetarianOrVegan)
        passengerNames.push(passenger.passengerName);
});

<span class="hljs-built_in">console</span>.log(passengerNames);
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-335.png" alt="Image" width="600" height="400" loading="lazy">
<em>RESULT / 'forEach'</em></p>
<h3 id="heading-how-to-solve-with-filter-amp-map">How to Solve with 'Filter' &amp; 'Map'</h3>
<p>To come up with the best option, this time, we will use two different methods. The '<a target="_blank" href="https://www.freecodecamp.org/news/javascript-array-filter-tutorial-how-to-iterate-through-elements-in-an-array/">filter</a>' and the 'map' functions will – in a way – collaborate to create better logic when solving the given problem. Let's examine the following code snippet closely now.</p>
<pre><code class="lang-js">
<span class="hljs-keyword">const</span> passengerNames = passengers.filter(<span class="hljs-function">(<span class="hljs-params">passenger</span>) =&gt;</span> passenger.isVegetarianOrVegan).map(<span class="hljs-function">(<span class="hljs-params">passenger</span>) =&gt;</span> passenger.passengerName);

<span class="hljs-built_in">console</span>.log(passengerNames);
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-336.png" alt="Image" width="600" height="400" loading="lazy">
<em>RESULT / 'filter' + 'map'</em></p>
<p>With the filter method, we only get the vegetarian / vegan passengers from our array in the first place. If it finds some non-vegetarian / vegan passengers (like our beloved 'Freddie'), it will get rid of them automatically. </p>
<p>Briefly, the first part of the equation, the 'filter' method will simply work through 'yes' or 'no' model. </p>
<p>Then, the 'map' function will come in, eventually giving us a brand new array showing the vegetarian / vegan passengers only. </p>
<p>This final solution will prove your future employer that you genuinely know what you're doing and you are really taking the right steps to be a hotshot developer.</p>
<h3 id="heading-interview-question-3-how-to-sort-passengers-by-connecting-flights">Interview Question #3: How to Sort Passengers by Connecting Flights</h3>
<p>The last section asks us to sort the list of our super cool passengers by the number of the connecting flights they'll take to eventually reach LA. Let's see who has more and as such, will be pretty exhausted. </p>
<p>Spoiler alert! Amy with four connecting flights in total might be a bit sleepy in the get-together at that fancy restaurant. But there is no doubt that she will somehow rock where ever she goes. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-322.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://variety.com/2022/music/global/amy-winehouse-freddie-mercury-john-lennon-tupac-shakur-bbc-studios-sales-1235196177/">Image Source</a></em></p>
<p>Anyway, what we need for this task is to know how the '<a target="_blank" href="https://www.freecodecamp.org/news/javascript-array-sort-tutorial-how-to-use-js-sort-methods-with-code-examples/">sort</a>' function operates.</p>
<p>Primarily, it compares items one by one and returns something as a result. In our case, it will be the number of connected flights. But how does it make that comparison? What is the logic behind that?</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-343.png" alt="Image" width="600" height="400" loading="lazy">
_[Source Code: MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global<em>Objects/Array/sort"&gt;&lt;nr-sentence class="nr-s149" id="nr-s149" page="0)</em></p>
<p>The above lines of code are pretty clear in general. Thanks to the 'sort' function, we list those months in alphabetical order. </p>
<p>Well, here comes the big question. How does the code / system know that 'a' is the first letter of the alphabet and as such, the list starts with the 'd' letter (December)?</p>
<p>The reason is that the 'sort function' lists things in ascending order by default. But can't we change this setting? Perhaps, we need to list items in descending order. Of course, we can. </p>
<p>Let's see how. To achieve what we want, we may utilise 'a' and 'b' letters as parameters leading to different directions.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-338.png" alt="Image" width="600" height="400" loading="lazy">
_[Source Code: MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global<em>Objects/Array/sort"&gt;&lt;nr-sentence class="nr-s160" id="nr-s160" page="0)</em></p>
<p>Simultaneously, we can benefit from the assistance of three numbers: -1,+1, 0 as seen above. When sorting items in descending or ascending order or finding the equal values, they can be quite handy. </p>
<h3 id="heading-tricky-bit-of-the-sort-function">Tricky Bit of the 'Sort' Function</h3>
<p>In the following example, the list is sorted in ascending order. Why is it like that? Here is the reason. When we return those 'a' and 'b' parameters, we use this order:  'a - b' . That gives us ascending values by default. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-339.png" alt="Image" width="600" height="400" loading="lazy">
_[Source Code: MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global<em>Objects/Array/sort"&gt;&lt;nr-sentence class="nr-s169" id="nr-s169" page="0)</em></p>
<p>However, if we swap them and say 'b - a', the list will be seen in descending order this time. That's the tricky bit when it comes to the 'sort' function.</p>
<p>In the above example, the first version (regular function) and the second one (arrow function) are in essence the same, but just be aware that <a target="_blank" href="https://www.freecodecamp.org/news/arrow-function-javascript-tutorial-how-to-declare-a-js-function-with-the-new-es6-syntax/">arrow functions</a> came with <a target="_blank" href="https://www.freecodecamp.org/news/these-are-the-features-in-es6-that-you-should-know-1411194c71cb/">ES6</a>. </p>
<p>Although arrow functions help developers to write less code, you cannot use them everywhere. (Read <a target="_blank" href="https://www.freecodecamp.org/news/when-and-why-you-should-use-es6-arrow-functions-and-when-you-shouldnt-3d851d7f0b26/">this</a> to find out when to use them.)</p>
<h3 id="heading-testing-our-new-knowledge">Testing Our New Knowledge</h3>
<p>Shall we now analyse the situation of our passengers through our new perspective? We know that the last task asks us to sort the number of flights in descending order. But the following set-up does the opposite. </p>
<p>It can only give us the list in ascending order. Why? It's simply because of the pre-defined order (passenger1.connectedFlights - passenger2.connectedFlights) as in the case of a - b example.</p>
<pre><code class="lang-js">
 <span class="hljs-keyword">const</span> numberOfFlights = passengers.sort(
  <span class="hljs-function">(<span class="hljs-params">passenger1, passenger2</span>) =&gt;</span>
    passenger1.connectedFlights -  passenger2.connectedFlights 
); 
<span class="hljs-built_in">console</span>.log(numberOfFlights);
</code></pre>
<p>Once we swap the order (passenger2.connectedFlights - passenger1.connectedFlights) as you see in the following code snippet, our problem will be solved and the list will come in descending order. </p>
<pre><code class="lang-js">
 <span class="hljs-keyword">const</span> numberOfFlights = passengers.sort(
  <span class="hljs-function">(<span class="hljs-params">passenger1, passenger2</span>) =&gt;</span>
    passenger2.connectedFlights -  passenger1.connectedFlights 
); 
<span class="hljs-built_in">console</span>.log(numberOfFlights);
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-342.png" alt="Image" width="600" height="400" loading="lazy">
<em>RESULT - Descending Order by the Number of Connected Flights / Michael is the luckiest :-)</em></p>
<h3 id="heading-can-we-also-use-for-loop-or-foreach">Can We Also Use 'for loop' or 'forEach'?</h3>
<p>Well, yes and no. Both would be low-level solutions for this question. </p>
<p>We should keep in mind that the sort function mutates an array. This is a kind of side effect which changes the original array and that might be a problem if we use 'for loop' or 'forEach' as a solution. </p>
<p>There are of course <a target="_blank" href="http://www.buginit.com/javascript/javascript-sort-without-mutating-array/">ways</a> to avoid mutation in the sort function, but in our example, it will lead to more lines of codes, which is not practical at all.</p>
<h2 id="heading-wrapping-up">Wrapping Up</h2>
<p>We've started the article with David Goggins, the symbol of resilience and grit, so let's end it with his inspiring presence and ideas. </p>
<p>If you happen to read this modern day hero's book or listen to one of those famous podcast episodes (For example, <a target="_blank" href="https://www.youtube.com/watch?v=5tSTk1083VY">this one</a>) where he was a guest speaker, you'll immediately understand that he wasn't born that way. Rather, his secret lies in the fact that he never gives up, against all odds. </p>
<p>Coding interviews are tough, but if you keep going after your goals by visualising the scene of success in your mind over and over again, it will -  sooner or later - be yours. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-328.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://castromarina.info/david-goggins-inspirational-quotes">Image Source</a></em></p>
<p>Many thanks for reading this post. If you've liked this article, one of the best ways to support me is to share it. Should you have any questions or comments, you can always contact me via <a target="_blank" href="https://www.linkedin.com/in/damla-erkiner-000b76227/">LinkedIn</a>. I'll be more than happy to help you out with your queries.</p>
<p>Happy coding!</p>
<p><strong>“Knowledge is power.” – Francis Bacon</strong></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Graph Algorithms for Technical Interviews ]]>
                </title>
                <description>
                    <![CDATA[ During technical interviews it is common for your interviewer to ask you to solve coding challenges. And you should have a good understanding of graph algorithms if you want to do well on these challenges. We just published a course on the freeCodeCa... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/graph-algorithms-for-technical-interviews/</link>
                <guid isPermaLink="false">66b202ae125aeccef6f65cb3</guid>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ youtube ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Beau Carnes ]]>
                </dc:creator>
                <pubDate>Wed, 04 Aug 2021 01:35:10 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/08/graph-interview.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>During technical interviews it is common for your interviewer to ask you to solve coding challenges. And you should have a good understanding of graph algorithms if you want to do well on these challenges.</p>
<p>We just published a course on the freeCodeCamp.org YouTube channel that will teach you about graph algorithms and how to use them to solve coding challenges.</p>
<p>Alvin Zablan created this course. Alvin's dynamic programming course is one of the most popular courses on the freeCodeCamp channel, and now he's back to teach you about graph algorithms.</p>
<p>Here are the topics and algorithms covered in this course:</p>
<ul>
<li>graph basics</li>
<li>depth first and breadth first traversal</li>
<li>has path</li>
<li>undirected path</li>
<li>connected components count</li>
<li>largest component</li>
<li>shortest path</li>
<li>island count</li>
<li>minimum island</li>
</ul>
<p>Watch the full course below or on <a target="_blank" href="https://youtu.be/tWVWeAqZ0WU">the freeCodeCamp.org YouTube channel</a> (2-hour watch).</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/tWVWeAqZ0WU" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<h2 id="heading-transcript">Transcript</h2>
<p>(autogenerated)</p>
<p>This course will help you learn what you need to implement graph algorithms and use them to solve coding challenges.</p>
<p>Alvin's dynamic programming course is one of the most popular courses on our channel.</p>
<p>And now he's back to teach you graph algorithms.</p>
<p>Hey, programmers, I'm Alvin from Structy.</p>
<p>Welcome to our course on graphs.</p>
<p>And in particular, this is going to be about graphs for your technical interviews.</p>
<p>Of course, graphs are a very common topic when it comes to those technical interviews.</p>
<p>And in particular, what I want to emphasize throughout this course, is the handful of patterns that come up time and time again, on those technical interviews.</p>
<p>in just about two and a half hours, I'm going to give you all the tools you need to basically cover I'd say about 80% of all graph problems.</p>
<p>And so what I have in store for this course, well, I think the key to victory for your data structures and algorithms, and especially your graphs is to visualize things, right.</p>
<p>So we're going to do is trace through a lot of different algorithms, and be sure to understand them at a high level.</p>
<p>And that means going through different animations here, I think graphs have a pretty bad rap for being a difficult topic.</p>
<p>Because to a beginner, you can have very, very different narratives around a problem, and not really understand.</p>
<p>They're all really based on a graph premise.</p>
<p>So we're going to realize that a bunch of different things can be understood as graphs.</p>
<p>So when it comes to the prerequisites of this course, I'm going to assume that you know nothing about graphs.</p>
<p>But you do know how to code, right, so I'm going to have the expectation that you understand some recursion.</p>
<p>So as you work through the course, and learn about different graph patterns, we're going to use those patterns to solve some very classic interview problems about graphs, right.</p>
<p>And I'm going to give you plenty of opportunity to practice these patterns in different problems that we will be ready whenever you have them on a technical interview.</p>
<p>What I love about the topic of graphs is just using a handful of different algorithms, you can cover the majority of graph problems, right.</p>
<p>For every graph problem that we cover, we're going to split it up into two sections, section one is going to be about the approach for the video.</p>
<p>So we're going to go over the strategy and overall theory, and be sure to sketch out a nice meaningful picture.</p>
<p>We're also going to talk about the complexity of the algorithm in the approach video.</p>
<p>Following every approach, we're also going to implement the code of course, I'm going to be writing all of my code in JavaScript, you'll be able to follow along in any language that you like.</p>
<p>So that means occasionally I'll be switching to my code editor where you of course can follow along.</p>
<p>We're also going to be sure provide links in description as well as links on screen.</p>
<p>That way you can formerly you read the prompts for every problem, as well as look at the different test cases.</p>
<p>Alright, I think that's enough introduction.</p>
<p>For now, let's hop right into the course.</p>
<p>Alright, programmers.</p>
<p>So let's jump right into the course, I want to start by giving you some background about your graphs, we're going to go over the graph basics that you need to start attacking problems in a technical interview.</p>
<p>So first off, what is a graph? A graph is really just a collection of nodes and edges.</p>
<p>So with respect to nodes, you can visualize them as typically just some circles with some data inside of them.</p>
<p>So I'll put some letter values in my nodes over here.</p>
<p>And when we refer to edges, that would be just any connections between nodes.</p>
<p>So for example, if there was a connection between A and C, it would look something like this, right? What I can formally say is there's an edge between A and C, I can create many edges between any nodes I want within this graph.</p>
<p>Another word you might hear out in the wild when it comes to describing nodes, as you might hear the word vertex being used, right, they're really the same thing.</p>
<p>In this course, I'll stick to the word node.</p>
<p>And an edge is just a connection between a pair of nodes.</p>
<p>And that's really all a graph is at a high level, where things get interesting is how we can use this graph framework to actually solve a problem, right.</p>
<p>So if you think of these nodes as just things and the edges as relationships, a graph is grid describing the relationship between things.</p>
<p>For example, we can say that the nodes here are cities and edges would be roads connecting cities are in a similar way, maybe our nodes here are courses, and then the edges represent prerequisites.</p>
<p>And so in the future, we're going to use graphs as a way to illustrate and frame some narrative problem.</p>
<p>Let's talk about this graph.</p>
<p>In particular, here, I really have drawn a directed graph.</p>
<p>And that's because I have some arrowheads along the edges.</p>
<p>That would be a comparison to an undirected graph.</p>
<p>So here, I have really the same structure, except I don't have any arrowheads on the edges here.</p>
<p>And that means that there is no directionality to it right.</p>
<p>If I look at the directed graph, let's say I was at the node A, well, then I can travel to B or C, let's say I move to C.</p>
<p>However, once I'm at C, I cannot travel to a, I can only travel to E, right? That's because I have to obey the direction of the arrow heads here.</p>
<p>By take a look at my undirected graph, let's say I was currently situated at the scene over here, that I do have the option of traveling to either a or E, right? So if I traveled to a, that's all good, I can even travel back to C.</p>
<p>So think of as an undirected graph as a two way street.</p>
<p>For now we'll just continue on with our directed version.</p>
<p>Let me also introduce some useful terminology we can use when talking about the nodes in our graph.</p>
<p>If I was currently situated at this a node, I can refer to B and C as neighbor nodes.</p>
<p>Alright, so a neighbor node is really any know that's accessible through an edge, of course, obeying the direction of the edge.</p>
<p>In other words, if I was currently situated at the sea node, that I only have one neighbor of E, right, if I'm at the sea, you know, then I won't consider a neighbor.</p>
<p>Awesome.</p>
<p>When you visualize graph algorithms, you should really sketch a picture that looks just like this, right literally drop nodes as circles and arrows as your edges here.</p>
<p>However, when it comes to how we implement this algorithm in some code, we're gonna have to represent it in a more programmatic way.</p>
<p>Right? So in my brain, I think of this image of like nodes and arrows between them.</p>
<p>However, in my program, I'm going to use typically an adjacency list, it's probably our preferred way to represent and graph information, right.</p>
<p>So depending on the programming language of choice we're going to use typically, we would use some hash map data structure to represent an adjacency list.</p>
<p>Really, we're looking forward to using some constant time, I'll look up data structure that has a key value pair mapping, right.</p>
<p>So if you're in JavaScript, they'll be an object, if you're in Python, they'll be a dictionary.</p>
<p>If you're in a language like Java, or C, you'll be using an unordered map.</p>
<p>Looking at this hash map, I have drawn or this adjacency list, the keys of this adjacency list are going to be every node in my graph, right, so I just have all of the node values A through F laid out as the keys.</p>
<p>However, if you look at the corresponding values, the values are actually going to be an array, right? So if I look at this very first entry, it says that I have a node of a and then in the array of populated all of the neighbors have a that is a has two neighbors have BNC.</p>
<p>That's why I have this correspondence within my adjacency list.</p>
<p>That holds true for every entry within my adjacency lists.</p>
<p>So for example, let's say look at the entry for e.</p>
<p>So I go to the spot and make j c list where the key is E, it only has a one outgoing edge to be.</p>
<p>That's why the array for he only has be inside of it.</p>
<p>One thing to also note is even if a node has no neighbors, it should still appear as a key within my adjacency list.</p>
<p>For example, if you look at the D, node D has no outgoing edges.</p>
<p>That's why its neighbor array is empty.</p>
<p>However, it should still at least appear as a key within my adjacency lists, right, that way, you can still know that the D node exists.</p>
<p>So at the start of the course, will usually be taking in adjacency list as the information to represent a graph, right.</p>
<p>But as we sketch through things on the whiteboard, we should be visualizing them using a nice picture like this.</p>
<p>Awesome.</p>
<p>So let's actually jump into our first pair of algorithms.</p>
<p>To me, the must know algorithm for a graph is really going to be to do some sort of traversal on it.</p>
<p>Why don't we start by talking about a depth first traversal, something you may have heard of before, right, now we're going to talk about the depth first traversal algorithm that operates on a graph.</p>
<p>So let's start by understanding at a high level what order a depth first traversal would give you.</p>
<p>So let's say I had some starting node, and I'm gonna choose a as my starting node, right, so I'm gonna color it here in yellow.</p>
<p>If I was following a depth first traversal.</p>
<p>Now that I've, you know, chosen as my starting point, I can either hit B or C.</p>
<p>Next, I'm just gonna commit to using B.</p>
<p>So let's say I had the sequence so far have a comma b.</p>
<p>And at this point, if I was truly following a depth first traversal, I must go deeper to the D node.</p>
<p>In other words, I don't go to the C node yet.</p>
<p>Cool, that would be a true depth first traversal, right.</p>
<p>At this point, now that I've bottomed out at D, D is a dead end, right? I can't travel to F from D, because that would be disobeying the arrowhead.</p>
<p>And so now I can move to that other neighbor of C.</p>
<p>And from here, the algorithm would continue, right, I go from C to E, and then e to B.</p>
<p>And technically, I would have to double traverse some nodes like B and D over here.</p>
<p>So overall, in this yellow coloring, I have colored the full region that a depth first traversal would explore starting at a notice that if you started at a it would be impossible to reach F.</p>
<p>And that's kind of normal, right? That's kind of why we use these traversal algorithms that can tell you whether or not you can travel between some nodes.</p>
<p>And we'll see that literal problem later on.</p>
<p>Right? So you're probably wondering, you know, exactly how do we implement this, but for now, I just want to stay focused on the order that we got, right.</p>
<p>So just regarding our depth first traversal, we remember the first three iterations of the algorithm, we hit the sequence of a B, D, right, that's indicative of a depth first traversal.</p>
<p>Now let's compare that to the breadth first Marion.</p>
<p>So I'm going to lay down the same exact graph, we're also going to start a traversal at the a node, but this time follow a breadth first order.</p>
<p>So I have a first and let's say, you know, I chose B as my next node when it comes to breadth first traversal.</p>
<p>It doesn't matter like which, you know, initial neighbor you choose, so I'm just gonna choose B.</p>
<p>But now that I've chosen B, if I was following a true breadth first traversal, I must hit c next, right.</p>
<p>And that's the main difference between our depth first and breadth first reversals for the same graph, my depth first would start a B, D, whereas my breadth first would start a, b, c.</p>
<p>And so you're probably wondering, is there any importance between this nuance right? When would I prefer depth first over breadth first, or vice versa? Either a depth first or breadth first traversal would explore the same exact nodes within a graph.</p>
<p>However, it would explore them in a different order, right? And this is more obvious to see when we have a larger graph with way more edges.</p>
<p>And so let's look at how he depth first traversal explores again, but this time on a much larger graph, let's take a look at this one.</p>
<p>So I'm going to choose some random node as a starting point, let's say I chose this node in yellow, that was doing a depth first traversal, what I'm going to do is, you know, pick a direction and travel in that same direction as far as possible before switching directions.</p>
<p>So let's say I move to the right, at this point, I would have to continue moving toward the right, until I can't move to the right any longer, at which point, I have to choose some new directions, let's say it was downward.</p>
<p>I'll keep doing that until I can't move downward anymore.</p>
<p>And so I'd have to move to the left now, now I'd keep chasing this single path in a very deep direction.</p>
<p>So that's behavior indicative of a depth first traversal, right, you're exploring one direction as far as possible before switching directions.</p>
<p>Let's compare that to a breadth first traversal.</p>
<p>So let's say start at the same node in pink, if I was following a breadth first traversal, it would look something like this.</p>
<p>From the starting point, I would explore all of the immediate neighbors of this node, kind of in a circle like this.</p>
<p>Now I just keep applying that behavior.</p>
<p>So as you notice about the breadth first traversal, is it'll tend to explore you know, all directions evenly, right, instead of just favoring One Direction all the way through.</p>
<p>That's really the only difference between a depth first and breadth first traversal.</p>
<p>Later on the course, I'll bring up explicit problems where you might prefer one over the other.</p>
<p>All right, but for now, what I want to do is give you all the background you need.</p>
<p>So you can actually build this algorithm will kind of talk about things at a high level, consider this the pseudocode, then, of course, we'll express it in some JavaScript code later on.</p>
<p>So when it comes to actually implementing in code, these two algorithms, the key is to understand that a depth first traversal uses a stack, and a breadth first traversal uses a queue, recall that a stack is something where you add to the top and remove from the top as well, or is it Q is something where you add to the back and remove from the front, and it gives you two very different orderings.</p>
<p>That's really the only difference between these two algorithms.</p>
<p>So let's start by tracing through our depth first traversal, of course, using a stack, so I'm going to use a slightly different graph.</p>
<p>And to visualize my stack, I'm going to use this bar to represent the bottom of my stack, obviously, for me, at least I think of a stack as some vertical data structure.</p>
<p>Cool.</p>
<p>So let's say I just arbitrarily chose a as my starting node to perform my depth first traversal, right, in the long run, just want to print out all different node values within this graph.</p>
<p>So what I'm gonna do is I'm gonna take my starting node of a, and I'm just gonna immediately initialize it onto my stack.</p>
<p>So right now as the only thing on my stack, it's also at the top of my stack.</p>
<p>And now I can enter the flow of the main algorithm here, because I have a stack, what I can only do is remove the top of my stack.</p>
<p>So that means I pop off a from the stack, and consider the a node, my current node being looked at, right? At this point, let's say I print out a to my console.</p>
<p>And from here, what I want to do is consider A's neighbors, right.</p>
<p>So if I look at the C node, what I should do is just push c to the stack, then also push B to the stack, right.</p>
<p>And it doesn't matter like in which order you push these neighbors.</p>
<p>If I want it to hit B first, then I'm going to push them second, right? Awesome.</p>
<p>That would end like my first iteration of this depth first traversal.</p>
<p>Cool.</p>
<p>So at this point, I can look at my stack, and my stack still has some data on it.</p>
<p>So I should do is again, pop the top of my stack.</p>
<p>So I'm going to pop and be off my stack.</p>
<p>And that becomes my current, I'm also going to print it out.</p>
<p>At this point, I look at B's neighbors, B has one neighbor of D and so I push d to the top of the stack.</p>
<p>Notice that because I have a stack D ends up on top of the C, right.</p>
<p>And so now when I get to another iteration, when I pop the top of my stack, I look at the D node as my current, right, and I can print out D.</p>
<p>And this feels good because so far, my print order would be a BD, notice that I kind of pursued that single path deeply following a BD.</p>
<p>But I have to look at DS neighbors, I can take f and just push f to the top of my stack.</p>
<p>next iteration, my stack is still on empty.</p>
<p>So I should do is pop the top F is now my current, I can print out F, but f has no neighbors.</p>
<p>So F isn't going to push anything else to the top of the stack.</p>
<p>Right? At this point, I get to this next pass, and I pop the top of my stack.</p>
<p>And that means C is now my current, I can print out CS value.</p>
<p>And then I can look at Sue's neighbors.</p>
<p>And I just push e to the top of my stack.</p>
<p>On this last iteration, I popped up on my stack, he is now my current I print out he since he has no neighbors, I don't push anything else to the top of my stack.</p>
<p>And at this point, I've reached the state where my stack is empty.</p>
<p>And that means my algorithm is done right that means you explored as far as possible within your graph.</p>
<p>Notice that it might not necessarily be the case that you're able to hit every node of the graph.</p>
<p>And this particular example it was possible though, awesome.</p>
<p>So let's redo that trace using Our breadth first algorithm, which means we just adjust things slightly.</p>
<p>And we use a queue order.</p>
<p>Remember that a queue is a first in first out data structure, meaning things enter to the back, and then they leave from the front.</p>
<p>And so let's say I use this arrow to represent the directionality of my queue, right.</p>
<p>And I start the algorithm in the same way for my breadth first traversal.</p>
<p>Let's say I want it to begin at node A.</p>
<p>So I just initialize my queue with a cool, so I start by removing the front of my queue.</p>
<p>So a becomes my current node, I can print out a as well.</p>
<p>And now I consider A's neighbors, right.</p>
<p>So I consider B and C.</p>
<p>If I wanted to travel to B before C, then I should push B to my queue first, right, so I add B to the back of my queue, right.</p>
<p>And I should also add c to the back of my queue, right.</p>
<p>And that would actually end my first iteration.</p>
<p>So now I look at my queue still has some stuff on it.</p>
<p>So I removed the front of my queue, that means B becomes my current.</p>
<p>Of course, I print out B.</p>
<p>Now I consider B's neighbors.</p>
<p>So I just look at the D node, and I push d to the back of the queue, since D enters through the back and ends up behind the C, and that's really important behavior.</p>
<p>next iteration, I removed the front of my queue.</p>
<p>So my current is now see, right, I can print out see, and then look at sees neighbors of just E and I add e to the back of the queue, which means that in the order of my queue, he ends up behind the my next iteration, I removed D from the queue, and I print out the edits neighbor of F to the back of my queue.</p>
<p>next iteration, I removed e from the front of my queue, print it out.</p>
<p>Since he has no neighbors, he is not going to add anything else to the back of the queue.</p>
<p>And of course, finally, f leaves the front of my queue, I print out F, F has no neighbors, at which point now my queue is totally empty.</p>
<p>And since our queue is empty, that would be the end of our algorithm.</p>
<p>Alright, and that's all there is to our depth first and breadth first algorithms, they're going to be the nice baseline code that we use to solve many different graph problems.</p>
<p>I think that's enough theory.</p>
<p>For now, what I want to do is now switch to my code editor, where you can actually implement these in JavaScript, hey, programmers, here I am in my editor, what I want to do is now show you how to implement those depth first and breadth first algorithms.</p>
<p>So we'll start with the depth first.</p>
<p>And my goal is really just to build a function that will print out all of my values in the graph, according to a depth first traversal, right, we're going to define this function depth first print, making an arrow function in JavaScript, it's going to take in the graph, which is going to be given as a nice adjacency list.</p>
<p>And this is actually the same graph.</p>
<p>Now last example we traced out, I'm also going to need to specify some starting node here, I'll call it a source node, we're going to begin the traversal.</p>
<p>Starting at that node.</p>
<p>Cool.</p>
<p>And so we know inherent to a depth first traversal is going to be a stack.</p>
<p>So I'll show you how to implement this iteratively, which means you need an explicit stack.</p>
<p>For me in JavaScript, that's as simple as just using a JavaScript array, right? I'll make it empty at the start.</p>
<p>And I can use this array as a stack, if I just commit to using operations that manipulate the same end of the array.</p>
<p>In other words, if I just use push and pop, that will always manipulate the end of the array, right? removing and adding to the end of that array.</p>
<p>What I want to actually be sure to do is I want to initialize the stack with my starting node, that is with my source node.</p>
<p>Remember that like a node here is really just designated by some character.</p>
<p>Cool.</p>
<p>And when it comes to designing like the main loop for the algorithm here, do you want to keep running the algorithm while the stack is not empty? In other words, wall stack dot length is bigger than zero, that I have to keep running.</p>
<p>That's very reminiscent to what we expressed on the whiteboard.</p>
<p>So when it comes to performing like a single iteration of this depth first, what I want to do is remove the top of my stack.</p>
<p>So if I do stack dot pop, that will remove the last item of an array, in this case like the top of my stack, and also return it to me.</p>
<p>So I'm going to save that to a variable, I'll call it my current.</p>
<p>And so this point would actually be a great opportunity to just print out that current.</p>
<p>So I'll console dot log current, right? So looking at, you know, this example over here, since I initialize a stack to contain just the source note of a, on the very first iteration, this while loop, I would of course, pop out a, then I would print it out, right.</p>
<p>And from that point, what I want to do is consider A's neighbors of B and C.</p>
<p>So if I want to look at like the array associated with a, I can just key into my graph, right, cuz my graph is an object right now.</p>
<p>So if I say graph, square bracket, current, right, if current is a, that means graph, square bracket current would give me back this array.</p>
<p>I want to iterate through every node or every neighbor in that array.</p>
<p>So I'm going to nest a loop here.</p>
<p>And I say for let neighbor of that array.</p>
<p>So if you're familiar in JavaScript, if you just use a for of loop, they'll iterate an order through an array.</p>
<p>So now I'm hitting a neighbor as B and neighbors see.</p>
<p>What I want to do with those neighbors is simply Push them to the top of my stack.</p>
<p>So that will just be stacked up, push and push this neighbor.</p>
<p>Awesome, I'm going to be sure to push every single neighbor that has.</p>
<p>So sometimes I'll have two neighbors.</p>
<p>Other times I'll have one neighbor, or even no neighbors.</p>
<p>That's really all there is to implementing a nice baseline depth first print.</p>
<p>Something that I do want to point out, my favorite way to implement this algorithm is to consider like processing your node, when it leaves the stack, not when it enters the stack.</p>
<p>In other words, I usually write like my print statement, right after something is popped.</p>
<p>And the thing that I pop is exactly what I print.</p>
<p>Right.</p>
<p>So let's go ahead and give this a run, see what we get.</p>
<p>It looks like in my terminal, I got the order of AC e b df, which you'll notice is slightly different from what I expected from over here.</p>
<p>However, this would be also a valid depth first traversal, we have to bear in mind is you know, depending on like the arbitrary order of values within the same neighbor's array, you could tend a different direction at first, right? Most important thing I look for when it comes to verifying a depth first is to make sure that I you know, chase the same direction before switching directions, right.</p>
<p>So since I started out with a C, so I go a and then to a C over here, the next move would be going to E and that's exactly what happened in my code, right.</p>
<p>And then once I hit E is actually a dead end.</p>
<p>So then I can go on to my other lateral neighbor like B, right.</p>
<p>And so I can contrive the same order expected here, if I just flipped this right.</p>
<p>And so I put c followed by B.</p>
<p>I'll give that around.</p>
<p>They're both valid.</p>
<p>depth first traversals.</p>
<p>See what we got now.</p>
<p>Cool, now I get the exact order of A, B, D, F, C.</p>
<p>And really think about why that is, right.</p>
<p>So let's say that I just popped out a from my stack.</p>
<p>So I printed out a that's nothing fancy, right.</p>
<p>And then from there, I start iterating through the array that's associated with a right, so on the first iteration, I iterate through C, right? If I push C on the stack, let's say this is the bottom my stack, by pushing on the stack, it's right here.</p>
<p>Then followed by that I pushed B on the stack.</p>
<p>Now B is on top.</p>
<p>Since B is on top, I know like the next top level iteration, this while loop, I would remove B and that's going to be the next note I visit.</p>
<p>And so they're really both depth for sure Russell's.</p>
<p>Nice.</p>
<p>So two things to note, you're definitely going to use a stack to implement depth reversal.</p>
<p>And you can use the stack in a few different ways.</p>
<p>Right? So here I'm using like an explicit like array as a stack.</p>
<p>And I'm implementing this using some iterative code, right.</p>
<p>So using a few loops, right, what you can also do is implement depth first recursively, because I know any recursion uses the underlying call stack.</p>
<p>So let me show you how to implement that as well.</p>
<p>And when it comes to, you know, having all these different tools in your arsenal, I would definitely practice both the iterative and recursive flavors.</p>
<p>We'll see that later on in this course.</p>
<p>So let's say I wanted to solve the same problem.</p>
<p>But now recursively, it's actually going to be less code.</p>
<p>So I'm going to have the same sort of arguments, I'm going to have the graph which is the adjacency list as well as a source node, consider like the source node as like your current location.</p>
<p>So if I'm at some node, maybe the first thing I should do is just print out myself, right, print out this node, so I'll do is console dot log, this source node.</p>
<p>And that feels good just from the get because when we actually do a top level call to this recursive function, they're passing in a as the source node.</p>
<p>So I do want to begin a as a first note in my print, and then from there, I need to look at AES neighbors.</p>
<p>Well, if you want to look at as neighbors like before, just key into the graph, adjacency list using that node, right, and this would give me an array of CNB.</p>
<p>Now I just iterate through that array.</p>
<p>So I'll say for let neighbor of that array.</p>
<p>And at this point, what I want to do is now do the recursion, right, so I make a recursive call on each of these neighbors.</p>
<p>So for me, that means just called depth first print, you give the same graph, right, the graph object doesn't change, but you should change like the source node.</p>
<p>Now you want to pass in that neighbor as the source node.</p>
<p>And you're going to make a recursive call for every neighbor in that array.</p>
<p>And this would actually be all we need.</p>
<p>Let's go ahead and just run this version.</p>
<p>divider run over here.</p>
<p>Looks like now we get the order AC E, B, D, F.</p>
<p>And that's really again, another type of depth first print, right, not exactly this order, because this time we chased c first, right, we went a C, I want to get exactly this ordering and my recursion, then I would have to put in B first, really same sort of pattern.</p>
<p>Now let's get that into the run.</p>
<p>Good AB de FC.</p>
<p>One thing I want to bring up about this recursive first is it has no explicit base case, meaning there's no obvious like, if statement that just like returns like you'd typically see in most recursion.</p>
<p>That's because in this problem I have an implicit base case when a node like he is a dead end.</p>
<p>All right, let's say my current source coming in is he, well, then when I iterate in this for loop, I'm iterating through this empty array, I mean to have zero iterations.</p>
<p>If you have zero iterations, then you never make a recursive call.</p>
<p>Right? That's the same thing as having a base case, right? A base case is really just a scenario where we don't have a recursive call.</p>
<p>So that's how this code still works.</p>
<p>Alright, so now you know how to implement depth first in two ways, right, iterated and recursively.</p>
<p>And they both use definitely a stack.</p>
<p>Let me now show you how to implement your breadth first, right as well comment out some of this code.</p>
<p>Now we'll do a nice breath first, give myself some room over here.</p>
<p>So for a breadth first, we want to solve the swan iteratively.</p>
<p>And it's really only possible iteratively, right.</p>
<p>So I know a breadth first traversal demands a queue, if you try to like implement a breadth first traversal using some recursion, and under the hood, there's some stack data structure, that's going to fight against the queue order that you want, right? So for breadth first traversal, you're always typically going to be writing some iterative code.</p>
<p>So some loops, right? Let me define this, I'll say breadth first print, take in the full graph, adjacency list, as well as the source node, I want to initialize my queue.</p>
<p>With that source note, again, the queue here is just going to be an array in JavaScript.</p>
<p>So I'll say const q equals an array that begins with just the source node.</p>
<p>Awesome.</p>
<p>And I'm going to use this queue by just committing to two specific methods on my arrays in JavaScript.</p>
<p>So if I use array dot shift that removes the first element of an array.</p>
<p>If I do array dot push that adds to the last position of an Array.</p>
<p>And using those two methods in combination would give me a nice cue, right, add to one end and remove from the other end.</p>
<p>So like before, we're gonna have a while loop, we're gonna iterate while our queue is not empty.</p>
<p>And so while queue dot length is bigger than zero, nice.</p>
<p>And same thing as our iterative, you know, at first, you want to start by just removing the front of your queue.</p>
<p>So I'll say q dot shift, that will remove the first element as well as return it to me.</p>
<p>So I can save in a variable, I like to call it current, just like the whiteboard, right? And from there, maybe I'll print it out.</p>
<p>So console dot log, this current node.</p>
<p>And from here, just consider your neighbors, right.</p>
<p>So if I key into my graph, using this current node, that gives me an array of its neighbors, I want to loop through each of those neighbors.</p>
<p>So I can say four will say let neighbor of that array.</p>
<p>And for that neighbor, I want to add them to the back of my queue.</p>
<p>So for me, that would mean simply q dot push, I'm going to go ahead and push that neighbor.</p>
<p>Awesome.</p>
<p>So I remove from the front, and I add to the back.</p>
<p>So that looks pretty good.</p>
<p>Let's go ahead and give it a run.</p>
<p>And actually, before I do that, I'm going to change the order of this, put the CNB.</p>
<p>Again, doesn't really matter the relative order for neighbors, I just want this exact output, and we'll talk about why that is right.</p>
<p>Give that a run.</p>
<p>So I get ACB EDF just like I expected ACB EDF, right.</p>
<p>So let's say you're on the first iteration of this breadth first print, I know that I would have just removed a because I initialized a on the queue, right? So my current is a and I print out a and then from there, I start iterating through this array, right.</p>
<p>So on the first iteration, I have C, that means I put c into my queue, right? And then afterwards, I put B, if you put C and then B, that means C is at the front of the queue, which is why on the second iteration, I have C first, right? So that's how you can manipulate potentially the lateral order of a breadth first print.</p>
<p>Awesome.</p>
<p>That's all there is to this traversal algorithm, what I really want emphasizes, especially if you look at the apples to apples iterative code, you compare depth first or breadth first, it's almost identical code.</p>
<p>You're really just changing how you access items in your array, right? You either pop or push or you shift and push harder than that the whole like structure of this code is identical, right? All right.</p>
<p>So that's our introduction on depth first and breadth first for our graphs.</p>
<p>In the next section, we're going to start to solve a problem, right, which will be really fun.</p>
<p>I'm just utilizing this code as our baseline tool.</p>
<p>And then that section also promised that start doing the analysis for bego of these algorithms.</p>
<p>So let's jump back to that whiteboard.</p>
<p>Hey, programmers, welcome back, right, and let's go over the approach for this has path problem.</p>
<p>So in this problem, we're gonna take in an adjacency list representing a graph for this problem, and really all graph problems, you definitely want to visualize this one with a picture.</p>
<p>And so what we'll do is we'll interpret each key of this adjacency list as representing a distinct node.</p>
<p>And if I look at any particular list, I can see that this f node should point to G and I.</p>
<p>And they do tell us in this problem that I have a directed graph.</p>
<p>So I'm going to draw arrowheads on these edges here.</p>
<p>So F points to G, as well as f points tie.</p>
<p>And I'll create similar edges based on the information in the given graph.</p>
<p>So we end up with an image like this, until they tell us that this is a directed graph that explains the arrowheads, but they also tell us that this graph is a cyclic.</p>
<p>So if you're unfamiliar, a cyclic just means No cycles, that kind of begs the question, what is a cycle in a graph.</p>
<p>So a cycle would be a some path through nodes, where I can end up where I want started.</p>
<p>In other words, if I started at the a node over here that I can go to B, then from there, I can go to C, then back to a, and so on and so forth.</p>
<p>So if I did a traversal, on the Sigma graph, I would get an infinite loop.</p>
<p>And what they're saying is, our graph input is guaranteed to be directed.</p>
<p>So it has arrowheads, but also a cyclic, so we don't have to consider any infinite cycles here.</p>
<p>That being said, In this problem, we also want to take in not only the graph information, but also a source and destination node, we want to do is return true or false indicating whether or not we can travel from the source node to the destination node.</p>
<p>In other words, is there a path that exists between those two nodes? For this problem, you can use either a depth first or breadth first search to actually solve the problem here, I'll trace through in this approach video, just the depth first search.</p>
<p>But in the walkthrough, I'll be sure to code it up both ways.</p>
<p>So let's say started at my source node, I know that if I was doing a depth first traversal, I can either choose the IRG, let's say happen to choose to G next.</p>
<p>Now I have no choice, right? If I'm doing truly a depth first, I should go deeper to the H.</p>
<p>So then I hit this H.</p>
<p>And as I traverse through these different nodes, I need to ask myself if my current node is equal to my destination.</p>
<p>So far, that hasn't been true.</p>
<p>At this point, I bottomed out with my h node, I can't travel any deeper.</p>
<p>So now I can move laterally to a node like I, at this point from I can either move to a K or a G, let's say by luck, I just happen to go to the G, this would actually bring me down a path I've explored previously, which we can optimize later on, but wouldn't be too much of a big deal.</p>
<p>Eventually, if I continued this depth first search through the graph, I would end up at a node that matches my destination, at which point I can return true signifying that there must be some path from F to k, just doing a depth first search.</p>
<p>And as we do this depth first search, it's really important that you obey the directions of your arrows.</p>
<p>So I should never try to travel upstream.</p>
<p>So that was a scenario where we were able to find a path from source of destination.</p>
<p>That's why we return true.</p>
<p>Let's reset and say that now, I should return false.</p>
<p>Alright, so let's say my source was J.</p>
<p>So I start at J.</p>
<p>And I'm trying to get to my destination of F.</p>
<p>If I start a depth first traversal, here, sorry, my j node traveled to the AI node.</p>
<p>At this point, I can hit either the G, okay, let's say I happen to hit the k, this point of bottom now.</p>
<p>So now I can move to the G.</p>
<p>And then from there to the H.</p>
<p>And at this point, there's actually nowhere else I can go, right.</p>
<p>So if I finish my traversal through the graph, using either a depth first or breadth first and I never hit my destination, then I can just return false, right? It must be the case that there is no such path from my source to my destination.</p>
<p>When it comes to implementing the depth first and breadth first reversals on this graph, it's going to be exactly what we're used to, you can either use a stack and solve it recursively.</p>
<p>Or you can do it iteratively.</p>
<p>And use a queue in which case you'd be doing the breadth first traversal.</p>
<p>We talked about the complexity of this, let's say that n is the number of nodes of our graph, a common thing that you can also do with these graph problems is define e as the number of edges here and edges refers to a connection between two nodes, basically just the arrows.</p>
<p>So if we use these two terms of number nodes and number edges, we would have a time complexity of our V o of the number of edges as because we would have to travel through every single edge of our graph.</p>
<p>Here, the space complexity would be based on the number of nodes, right? If I solved it, recursively, or even iteratively, with some sort of a depth first stack, then the worst case, I would have to have every single node on the stack, right? Likewise, if I saw the eternity with a breadth first I would have every single node on the queue.</p>
<p>So that's just one way we can define the terms for analyzing the time and space of this graph.</p>
<p>Typically, for graph problems, another acceptable way to analyze the time and space of your algorithm is to just use a single variable and just define n as the number of nodes.</p>
<p>That's because if you say n is the number of nodes, then we can also say that n squared would be the number of edges, or that big O.</p>
<p>It's about the worst case.</p>
<p>So let's imagine the worst case graph.</p>
<p>Let's say I just had these nodes of ABC.</p>
<p>Well, if I wanted to create as many edges as possible, how would I just create a single edge? Well, an edge is just a connection between two nodes.</p>
<p>So you could just really draw an edge for every pair of nodes in your graph, something like this.</p>
<p>And that's why we can say that n squared is the number of edges of any particular graph.</p>
<p>And so if you just wanted to use n to define the complexity here, then you could say that your time is going to be O of n squared, and your space complexity would still be O of n.</p>
<p>Do know that these are both two valid ways for defining the complexity for a very typical graph problems.</p>
<p>That being said, I think this is pretty straightforward.</p>
<p>Let's hop into the walkthrough video while we're actually implement both a depth first and breadth first solution for these.</p>
<p>I'll see you there.</p>
<p>Hey, programmers, Alvin here, right now.</p>
<p>Let's go over Ah, JavaScript solution for this has path problem.</p>
<p>And so we'll jump right in, we're gonna start by solving this one using a depth first traversal, which I know requires some underlying stack data structure, I'll just implement that using recursion.</p>
<p>So I can leverage the call stack to get my ordering.</p>
<p>And so I'm gonna solve this recursively, I'm gonna consider my source argument as like my current position during the traversal.</p>
<p>And so I can have a base case in check.</p>
<p>All right, if my source is equal to my destination, that I must have found the thing I'm looking for.</p>
<p>So just return true.</p>
<p>This base case signifies that I found my destination.</p>
<p>So there must exist a path.</p>
<p>And so I return true, always paying attention to the type that they want us to return for this function.</p>
<p>Let's say it's not true, well, they need to keep looking.</p>
<p>So what I should do is consider my current node, which is source, consider its neighbors.</p>
<p>If I key into my adjacency list, I know that this is going to be an object.</p>
<p>So I key into it using my source, that would give me an array of all of its neighbors.</p>
<p>So for example, let's say it was staring at this one, if my current source was F, and I say graph square bracket, F, I would get back an array of gi.</p>
<p>So now I want to look through the neighbors, right? So I can see over here is turned us into a loop and say for that neighbor of those neighbors, I want to traverse to them, which means I call recursively.</p>
<p>Right call has path, keep your graph the same, but update your current position.</p>
<p>Now I'm going to be situated at the neighbor.</p>
<p>And the destination stays the same, right, always have the same goal to get to solving this one recursively.</p>
<p>So think about what type of this is going to return, I know it's going to give back Boolean, right, it's going to tell me whether or not there is some path between my neighbor and the destination, right.</p>
<p>So if there's some connecting point, or some connecting path between my neighbor and the destination, then I know that there must be some path from my source to the destination, because your source is definitely next to your neighbor, right.</p>
<p>So there would be a path between all of us.</p>
<p>And so what I'll do is, check if this recursive call returns true, I'll make it explicit here, maybe it's clear.</p>
<p>And so if there is some path through my neighbor to the destination, then I can return true, just pass that true upward.</p>
<p>Because once I find a path, you can just exit out and return that shoe all the way back to the top level of color.</p>
<p>But let's say that this call returned false, that means that there is no path through my neighbor to the destination.</p>
<p>But it couldn't be the case that some other neighbor is actually going to work out.</p>
<p>And so what I don't want to do is just say like else return false, you should be able to immediately catch that code like this as suspect because there's no point of having a for loop then right? If in either case, you're always going to return, then you're never going to have a second iteration of this for loop, right? So if I don't find a path through my neighbor, so if this call returns false, then that's okay.</p>
<p>Just continue on to the next iteration, and search through your other neighbor.</p>
<p>that begs the question, Where should we return false, needs to be after the for loop? So only after I searched through all of my neighbors, and I never find a winning path? Should I return false, and that'd be our nice depth first traversal.</p>
<p>Let's give that a test run.</p>
<p>Awesome.</p>
<p>There we have it.</p>
<p>One thing to bear in mind here, we are leveraging the assumptions in the problem, right, they tell us straight up that the graph is going to be given is a sick like, so there are no cycles.</p>
<p>So that's why in our code, we didn't really worry about getting trapped in an infinite loop.</p>
<p>In our upcoming problems, we'll have harder grass to actually deal with that sick case.</p>
<p>But for now, this is a good baseline solution.</p>
<p>While we're here, let's also do a reference solution, which you know, by now should be iterated, right, there's no way to do like a breadth first recursively.</p>
<p>And so I need to create my own queue.</p>
<p>So I can create a queue, kind of in a pinch, I always just use an array in JavaScript, I'm gonna initialize that queue with my source on it.</p>
<p>So I'm gonna refer to like source and destination, they're really nodes.</p>
<p>But in the context of like our problem, they're really just given us strings, but they represent nodes, right? So think about the information they represent.</p>
<p>I'm going to iterate while my queue is not empty.</p>
<p>So while q dot length is bigger than zero, should be familiar code, very similar to our tree algorithms.</p>
<p>And I start a single iteration of reference by removing the front of my queue.</p>
<p>So I can say q dot shift some of the front, I can call that my current node that I'm traversing through.</p>
<p>And now that something has left the queue, typically here is where I check, I can check.</p>
<p>All right, if a thing I just visited, if that is my destination, then I can just return true, right, I found the thing I'm looking for.</p>
<p>So there must be a path that connects my original source and my destination.</p>
<p>Nice.</p>
<p>But let's say this was not true.</p>
<p>Well, then I need to consider its neighbors.</p>
<p>So like before, look at the neighbors just key into your graph using the source like it's a graph, square bracket source.</p>
<p>That gives me an array of all of the neighbors, all the neighbor nodes.</p>
<p>That's what I want to do here is iterate through every neighbor Over there.</p>
<p>And then I can just add them into my queue.</p>
<p>So q dot push that single neighbor, and do be sure to implement your true breadth first.</p>
<p>So you need to make things leave from one end of your queue, and you add to the other end.</p>
<p>So this codes looking good.</p>
<p>So you should realize how similar This is to our old like binary tree breadth first, except now we have to account for the fact that we could have like a dynamic amount of neighbors here, not just dot left and dot, right.</p>
<p>So I'm just iterating through all those neighbors adding them, I need to wait to return false.</p>
<p>And you guessed it, the move is after you finish this entire while loop, if your cube becomes empty, then you must have explored as far as you could.</p>
<p>And if you never return true, and now you can return false, because it must be the case that there is no path between the original source and your target.</p>
<p>So let's give this a test run will have a very similar time and space complexity.</p>
<p>But this would be the code for all of my iterative fans.</p>
<p>So here I'm getting a little error.</p>
<p>Let's see what we did wrong here.</p>
<p>So it looks like I timed out here.</p>
<p>Let's see bug this one together, I had to guess that means I did something wrong getting trapped in an infinite loop.</p>
<p>This condition looks okay, right q dot length greater than zero.</p>
<p>And so here it is, must be the case that I'm not correctly iterating through the neighbors here, I just wrote source.</p>
<p>Instead, I need to say current, because now I'm doing this iteratively, right.</p>
<p>So whatever node has just left my queue, I consider that nodes neighbors and add them to be visited next through my queue.</p>
<p>So let's give that a test run.</p>
<p>honest mistake there.</p>
<p>Cool.</p>
<p>And there's our breadth first solution for this has path problem.</p>
<p>So what I want you to do is practice both the depth first and the breadth first, like you expect, we're going to do a lot of graph problems coming up.</p>
<p>And depending on you know what the problem is asking sometimes will prefer one type of algorithm over the other.</p>
<p>So it's really important that you practice both of these algorithms.</p>
<p>Now, all the problems are relatively easy.</p>
<p>So practice this, give it a shot on your own.</p>
<p>And I'll catch you in the next problem.</p>
<p>See you there.</p>
<p>Hey, programmers, Alvin here, right.</p>
<p>Now let's go over the approach for this undirected path problem.</p>
<p>So we'll jump right in.</p>
<p>In this problem, we're going to be given an edge list for a undirected graph.</p>
<p>So if I are familiar with the terminology here, really what we're saying is every pair and this edge list represents a connection between two nodes.</p>
<p>For example, if I look at the first edge, and the list, I see i comma j, that means that there's a edge or connection between i and j.</p>
<p>And since this is an undirected graph, not only can I directly travel from i to j, but I can of course, move from j to i.</p>
<p>So it really represents a connection in both directions.</p>
<p>And so as we start to attack, this problem we'll want to do is actually convert this edulis into a more favorable format, like an adjacency list.</p>
<p>That's because typically, when we perform our traversal algorithms, they work best on an adjacency list form.</p>
<p>So let's start by doing that conversion here.</p>
<p>And I'll actually be pretty easy to code up.</p>
<p>So I want to basically generate a graph where I have nodes as keys, I want them to point to a an array of their neighbors.</p>
<p>For example, if I wanted to convert the first edge into an adjacency list form, what I can do is create keys for i and j.</p>
<p>Now that I is a neighbor of J, and also j is a neighbor of I, so I'm going to populate those neighbors respectively.</p>
<p>Now just follow this process for another edge.</p>
<p>So if I look at the edge, k comma i, I need to create a new key for K.</p>
<p>And I'm going to populate that with I and then for the existing key of I, I just add k into that collection.</p>
<p>So do bear in mind, the most important thing about this conversion is because we know that the graph is going to be undirected, whenever you put a connection within your graph, make sure that you have the inverse connection.</p>
<p>So if I have an edge from k to AI, they also need to have information for it.</p>
<p>Okay.</p>
<p>And this process would just continue for the entire list of edges.</p>
<p>And by the end of this conversion, we'll end up with an adjacency list just like this.</p>
<p>And now we're ready to perform our main algorithm.</p>
<p>When we go through the code walkthrough for this, I'll show you in depth how you can actually create this adjacency list.</p>
<p>And so when we want to actually come up with a traversal algorithm to solve a graph problem, it really helps if you actually visualize the shape of your graph.</p>
<p>So actually want to visualize this in terms of nodes and edges.</p>
<p>That means a bunch of circles and lines between them.</p>
<p>If you drew out a nice picture for this graph information, you would end up with a diagram like so.</p>
<p>And so we'll go through the rest of this approach video just referencing this diagram.</p>
<p>Something important I want to bring up at this point is for this graph, a very common case we'll have to handle is what if your graph has a cycle.</p>
<p>And that's especially true for your undirected graphs.</p>
<p>And so just for the purposes of this approach video, I'm going to add an additional edge just so we can talk about an explicit cycle.</p>
<p>So I'm going to add one new edge from k to J.</p>
<p>Cool.</p>
<p>The reason is now there's a nice big cycle of length three highlighting in red right now.</p>
<p>And this cycle is important to watch out for because if we don't do any special handling Then we may get trapped in an infinite traversal.</p>
<p>So imagine I started at this keynote, and next I moved to J, then I would move to i, and then back to k, and then back to J, and then I, and so on.</p>
<p>So now it gives me a cycle, we'll have to guard against that.</p>
<p>And so I can have a cycle of three nodes here, right, and you can really have a cycle of basically almost any size, as long as it's more than one.</p>
<p>So for example, if I took a look down here, notice that my graph actually contains technically like two separate islands, but we would consider them as just one giant graph, right? So I've got the small island of O and N, they actually form a trivial cycle, right? If I started traversal, at o.</p>
<p>From there, I can move to n.</p>
<p>And because I know that the edge between o and n is bi directional writes an undirected graph, that means I can travel back to O, and then back to n.</p>
<p>And this would give me cyclic behavior.</p>
<p>So have to watch out for all types of cycles in this problem.</p>
<p>So in the context of this problem, not only are we given a graph, we're also going to take in a two nodes.</p>
<p>So let's step through an example where I want to return true or false, is there a path between I and L.</p>
<p>So I'm going to mark those in my graph Israel.</p>
<p>So I'm going to start at the notify.</p>
<p>And to solve this one, you can use any type of traversal.</p>
<p>So either depth first or breadth first, I'll step through explicitly the depth first traversal.</p>
<p>Right.</p>
<p>Now, in order to avoid any infinite traversals, I want to mark my nodes as visited as I travel through them.</p>
<p>So not only do I situate myself at this source note of I, but I'm gonna mark it as visited.</p>
<p>And you can implement this like marking a visited pattern.</p>
<p>And a few different ways.</p>
<p>When we code this up later on, we're probably going to use a set to represent what we have visited.</p>
<p>But for now, I'll just check them off in my diagram.</p>
<p>And so in my diagram, if you see a checkmark next to a node, that means that I already have visited it.</p>
<p>So since I'm at this node of I want to move to its neighbors, so I'm gonna move to the neighbor of J.</p>
<p>And I'll also be sure to check it off as visited.</p>
<p>At this point, I can move to one of Jays neighbors, let's say I move to k.</p>
<p>And I'm also going to mark it as visited.</p>
<p>Now then Matt K, I can move to a few different neighbors, I could either move to I LRM.</p>
<p>Let's say by chance I chose I, I once I get to this, I know, I'm immediately going to be able to see that, oh, I visited this node previously.</p>
<p>So what I should do is not travel through it again.</p>
<p>Instead, I should go back to the K, right, because this eye node is already visited.</p>
<p>And that's where I actually avoid the infinite loop.</p>
<p>So instead, I moved to some of Kay's other neighbors, let's say I chose the L.</p>
<p>At this point, I would mark it as visited.</p>
<p>If I do a quick check, I can see that this note I'm at L is also my destination node.</p>
<p>So I must have just found a path between my source and the destination.</p>
<p>So at this point, if I find my destination, I can just return true, which was a pattern we spoke about in a previous problem, the only additional criteria we need is to mark nodes as visited.</p>
<p>That way, we don't get trapped in an infinite loop.</p>
<p>And that's only going to be needed if we have cycles in our graph, which if they don't give us any assumptions we should always guard against.</p>
<p>So let's take a look at another example.</p>
<p>Let's say I had a source of K.</p>
<p>And my destination was Oh, just looking visually in the graph, you can already see that there's no way to get from k to O, because they're disconnected, right, they're on separate islands both step through the algorithm regardless, so I'm going to start at K gonna mark it as visited, I'm going to visit some of Ks neighbors.</p>
<p>So I can move to i, then I can move to J.</p>
<p>And then at this point, I would move back to K and really make sure they don't explore any of Ks visited neighbors, so I don't move back to I right, instead, I should move to an unvisited neighbor, like l market is visited, then I only have one other node to visit, which would be this m node.</p>
<p>And at this point, I've actually exhausted this full graph region, right, there's nowhere else I can go.</p>
<p>And once I finished my traversal, if I never find my destination node, then I can just return false, right? It must be the case that there is no path that exists from my source node to the destination node.</p>
<p>That's really all there is to this algorithm.</p>
<p>Let's talk about the complexity.</p>
<p>If we say that n is a number of nodes, let's also define that he is a number of edges.</p>
<p>Like we said previously, this is something typically acceptable to do for our graph problems.</p>
<p>I know that the time complexity is going to be roughly of the number of edges.</p>
<p>And my space complexity is going to be O of n that is the number of nodes.</p>
<p>I think it's worth stepping through, you know what this complexity actually means, you know, big O refers to the worst case.</p>
<p>So let's think about a worst case graph that we can have.</p>
<p>And there are a few different graphs that you can kind of design and think of, I'll just show you one example.</p>
<p>So let's say I was given a graph like this, right? Notice that although z is kind of on its own island, all of these nodes that is a three as well as a C note.</p>
<p>They're all members of the same graph.</p>
<p>So let's say I wanted to figure out is there a path between A and z.</p>
<p>So if I did my traversal algorithm from here, I'll start at a then I move to B, and then to C, and then to D, and then to E.</p>
<p>At this point, I've covered all of the edges in the graph.</p>
<p>Remember that the edges are the arrowheads here, because I have to travel through every edge of this graph.</p>
<p>That's why we said the time complexity in the worst case is going to be o of E, right o of the number of edges.</p>
<p>and here we can say the space complexity is O of n.</p>
<p>Because if you're doing this with either a depth first stack, or a breadth first queue, in the worst case, you would have to add everything you visited, or that is all of the nodes onto your stack or queue.</p>
<p>That's why we say for regular graph traversal algorithms, we have a time complexity of o v, and a space complexity of O of n.</p>
<p>All right, I think we have the approach for this algorithm down pat.</p>
<p>At this point, I want to join me in the walkthrough videos, where we can actually see how to implement these visited patterns in some code.</p>
<p>I'll see you there.</p>
<p>Hey, programmers, Alan here, right.</p>
<p>Now let's go over a JavaScript solution for this undirected path problem.</p>
<p>So we'll jump right in, just like we said, in the approach video, there's going to be a two parter.</p>
<p>First, we're going to convert our edge list into an adjacency list.</p>
<p>That way, it's easier to do a classic traversal through it.</p>
<p>So I'm going to pretend I had a helper function here.</p>
<p>That gives me back an adjacency list.</p>
<p>I'll call it graph.</p>
<p>And I'm going to call this helper function, we'll say build graph.</p>
<p>And if I pass it, just all of my edges, I want it to do that conversion for me.</p>
<p>So let's work on that helper function right now.</p>
<p>And then we'll jump back to undirected path.</p>
<p>So I'll create my build graph function, just going to take in the edges, right.</p>
<p>And I know I want my adjacency list to be in the form of a plain old JavaScript object.</p>
<p>So create that graph object here.</p>
<p>And I'm going to return it by the end just like this.</p>
<p>And what I want to do is fill up this graph with information from the edges.</p>
<p>So I'm going to iterate through every edge.</p>
<p>So for let edge of edges, so iterating, through every single edge, I know a single edge would be a pair.</p>
<p>So I'm just gonna de structure out of that, maybe just my two node identifiers, we'll call them a and b, from the edge.</p>
<p>Nice.</p>
<p>What I want to do is now initialize these nodes as keys of this graph object.</p>
<p>So a would be something like this, I note or this k node, right.</p>
<p>So what I'll do is check if A is in my graph, I think really clean up this code, we better if I check if it's not in the graph.</p>
<p>So if the a node is not in the graph, then what I can do is initialize it in the graph.</p>
<p>So use it as a key and assign it to be an empty array.</p>
<p>And I'll do the same for B over here.</p>
<p>Right, so I'm initializing A and B in the graph if they don't exist, and once I do that, then I can safely just add neighbors into their their edges, right? So I can say, the graph square bracket a dot push B.</p>
<p>So now I'm saying that right, B should be a neighbor of a, but I know that this is an undirected graph, right? So that should be symmetric.</p>
<p>In other words, then make sure you push a into the neighbors of B.</p>
<p>So it's really important that you notice that this is an undirected graph.</p>
<p>So your adjacency list needs to be symmetric in that way.</p>
<p>So if a is in B's neighbors, B should also be an A's neighbors.</p>
<p>So that's looking pretty good.</p>
<p>Let's go ahead and see how that graph looks just with a little little side test here.</p>
<p>So I must steal maybe this snippet, get that full snippet here, I could just run it manually love to make sure I can test these little helper functions before I use them.</p>
<p>So we'll give this a run, we should just see the adjacency list form of these edges here.</p>
<p>See how it looks.</p>
<p>So that looks pretty good.</p>
<p>So I'm seeing that all right, I is connected to J and K.</p>
<p>Right? And that looks correct based on these edges.</p>
<p>Awesome.</p>
<p>And I'm also want to make sure that it's symmetric, right.</p>
<p>So if i and j are over here that I should have JNI over here as well, right, it should be a two way street.</p>
<p>Alright, now let's work in our real algorithm here, which would be some sort of traversal.</p>
<p>Now that you have a nice adjacency list, you can do either a breadth first or a depth first traversal.</p>
<p>I'm going to implement I think, a depth first.</p>
<p>Typically for me, it's just easier to raise push if I do it recursively.</p>
<p>And so I'm going to pretend I had a function called has path, it's going to take in my graph now.</p>
<p>And also a start node and an end node.</p>
<p>So I want to find a path from node A to node B, of course, I'm going to assume that this function returns a Boolean.</p>
<p>But of course, I have to write that function for myself.</p>
<p>So stay organized in our code, we'll say has path.</p>
<p>I'm going to take in the graph as well as node A and node B.</p>
<p>And I think a better name for these arguments as I'm doing this recursively.</p>
<p>Let's call this one source and this one destination.</p>
<p>So over time, we're going to call recursively and update this source node.</p>
<p>And that should be a familiar pattern to some other problems resolved.</p>
<p>Recently.</p>
<p>So think about my base case.</p>
<p>All right, I know that I've has successfully found a path when my source is equal to my destination node, if that's the case in return true, because I just found a path.</p>
<p>Otherwise, I have to keep looking.</p>
<p>So I should be able to look through the neighbors of my source node.</p>
<p>So I could say graph square brackets source, right? Remember that any point through this recursion source represents my current position.</p>
<p>If I say graph, square bracket source, let's say source was I, I'd be accessing all of ies neighbors, right? So I want to do is really iterates for let neighbor and, or rather have graph of source.</p>
<p>So if sources I on the first iteration neighbor would be j, second iteration neighbor might be K.</p>
<p>And for each of my neighbors, I want to travel to them.</p>
<p>So call has path, you can keep your graph argument the same needs to change your source though now you're situated at your neighbor, and your destination is fixed, or you're always trying to get to the same exact node.</p>
<p>I'm gonna think about what type this returns I know this is going to tell me Boolean, right? True or false? Is there some path from my neighbor to the destination, I'm going to check.</p>
<p>All right, if that call, returns true, I'll be explicit here, then I've just found a path.</p>
<p>So just return that true, right, pass it all the way back up.</p>
<p>And kind of the logic that we form here is, I know that by definition, source and neighbor are definitely connected.</p>
<p>So there's definitely a path between them.</p>
<p>They're connected by a direct edge.</p>
<p>So if my neighbor has a path to the destination, then I know, then the source also has a path to the destination.</p>
<p>Awesome.</p>
<p>And so after this for loop is done running, let's say we never find that any of our neighbors make a winning path, then means I finished this for loop without ever returning true, which means that I can return false right must be the case that this source node does not have some path to destination.</p>
<p>So I think we can go ahead and give this code a test run.</p>
<p>If you watch the approach video, you'll notice that there's something important missing from this code.</p>
<p>But we'll just run it and show you how to fish here.</p>
<p>So here I'm getting an error edges is not defined what I do horribly wrong, line 34 months ago, line 34 over here.</p>
<p>So got to take out this call, don't need that anymore.</p>
<p>That's on me.</p>
<p>Let's get that test run.</p>
<p>So that was not the error I was expecting.</p>
<p>I am expecting some sort of an infinite loop, though.</p>
<p>Perfect, I'm getting maximum call stack size exceeded.</p>
<p>So I got like an infinite recursion really.</p>
<p>And that's going to occur because we didn't account for the case where we have cycles in our graph, right, we need to avoid that.</p>
<p>Because if I have a cycle in my graph, I'm never going to hit any of these base cases, I'm just gonna keep traveling around in a circle.</p>
<p>And if that's unclear, make sure you watch the approach video, right.</p>
<p>And so like we said, the move here is to add some sort of data that shows where you've been previously.</p>
<p>Typically, the way we do this for our graph problems is to track some visited set.</p>
<p>So when I make my top level call to this house path, I know that that is the actual function that does that traversal, I'm going to pass along a new argument here.</p>
<p>And I'll make it a new JavaScript set.</p>
<p>So if you're unfamiliar with sets, and JavaScript, they're really just a collection of items.</p>
<p>And what's really great about a set is in o of one time, I can add something into the set.</p>
<p>And I can also check for something within the set is going to be very, very quick for our traversal.</p>
<p>I don't want to use something slow like an array, because to do a lookup or a check within an array, that would actually be O of n time, or it's for a set, it's o of one.</p>
<p>So I'm going to make a new argument here to receive a column visited.</p>
<p>What I want to do is all right check if my source node is already in the visited set to do that in JavaScript I can check visited out has.</p>
<p>So if the source node is inside of the visited set, then I could return false here, right, there's no reason to travel through this node anymore.</p>
<p>Because if it's an visited then I must have traveled at previously.</p>
<p>And this is how I can avoid an infinite recursion can also move this line downward if I wanted to.</p>
<p>And let's say that I make it through this if statement.</p>
<p>So that means that all right, this node source has not been visited.</p>
<p>But I'm visiting it right now.</p>
<p>So I need to do visit a dot add source.</p>
<p>So this expression checks if source is in visited, and this expression adds source to the visited set.</p>
<p>I want to change a few other details here.</p>
<p>Make sure that you pass along the same visited set through all of your recursive calls over here.</p>
<p>Because you want this visited set to be like global for the entire traversal right I need to know exactly where I've been in the past.</p>
<p>And once we have that in place, that should be everything we need to prevent any any cycles from giving us infinite recursion here.</p>
<p>Let's give it a test run.</p>
<p>Awesome.</p>
<p>There's a solution for our undirected path problem.</p>
<p>So important things to take away here do consider this problem, a two parter right? phase one is really straightforward, just converting an edge list into an adjacency list, which is actually an important skill to practice.</p>
<p>Because when it comes to, you know, some problems you'll face in the wild, they are all going to be basically graph problems.</p>
<p>But sometimes they'll give you the graph and like a different format, and you can always convert into a format that you're comfortable with.</p>
<p>And from there, we have a really core pattern of just doing a traversal through a graph, but also guarding against infinite loops, right.</p>
<p>And to do that, we just use some sort of a visited set.</p>
<p>Hey, programmers, welcome back right now want to go over the approach for this connected components count problem.</p>
<p>So in this problem we want to do is take an adjacency list representing an undirected graph.</p>
<p>As always, with any graph problem, you want to start by visualizing the actual graph.</p>
<p>And so if you took a picture of this information, it would end up looking like a graph with this structure.</p>
<p>The first thing we should notice about this visual graph is that a has multiple connected components.</p>
<p>So for example, I can look at this component in pink spanning just the one and two nodes, I can look at another component spanning the four or 5678 nodes.</p>
<p>And finally, a third component just covering the three node.</p>
<p>And that's why we say that your result for your function here should be three, right? Because there are three different connected components.</p>
<p>So let's come up with an algorithm we can use to count the components, we know that a general counting algorithm is going to use some variable, and we'll initialize that count variable to zero.</p>
<p>And the trick here is to use a combination of both some standard graph traversal code, maybe a depth first as well as some iterative code.</p>
<p>So I'll do along the left hand side is just list out all of my different nodes.</p>
<p>And what I'll do is start by iterating, through every node of this list.</p>
<p>And what I'm going to do is when I'm currently at some note of this iterative list, I'm going to start a traversal at that node.</p>
<p>So right now starting at the node of one, I begin, let's say a depth first traversal, you can really implement this pattern using either a depth first or breadth first.</p>
<p>So let's say I start at the one node over here.</p>
<p>What I should do now is continue this traversal as far as possible, that's the key to victory here.</p>
<p>So from this one node, I can move to a neighbor of two.</p>
<p>And of course, as I travel through these nodes, I want to make sure that I mark things as visited, so I can avoid loops.</p>
<p>And marking things as visited will also ensure that we don't double count any components here.</p>
<p>Once I hit that to note, I've actually completed this full component, there's nowhere else I can explore.</p>
<p>So at this point, I should increment my count by one.</p>
<p>So whenever I complete a new traversal on some region of the graph, I need to increment my count.</p>
<p>At this point, I now fall back to my iterative code on the left hand side, and I iterate through the next node.</p>
<p>So I now look at node number two.</p>
<p>If I take a look at node number two, I see that I already have it marked as visited.</p>
<p>So that means I don't need to start a traversal at that node.</p>
<p>So effectively skip the two and keep the count the same.</p>
<p>next iteration I have a three, three is unvisited right now.</p>
<p>So I should begin a new traversal starting at this three node, which means I just mark it as visited.</p>
<p>And since this three is a singleton node, right, it's not connected to anyone, I would actually complete their traversal, just on the three node.</p>
<p>At this point, I've completed a traversal.</p>
<p>So I increment my count by one.</p>
<p>So now I have a total count of two, I fall back to my iterative code.</p>
<p>So I moved from the three node to the four node.</p>
<p>And I see that this four node is unvisited, which again means I must begin a traversal from this four node.</p>
<p>And I'm going to expand this traversal.</p>
<p>Starting at four as far as I can, before I go back to my iterative code, right, so I'm going to explore the six, explore this five, explore the seven, and finally explore this eight.</p>
<p>At this point, I've completed a traversal.</p>
<p>So I can increment my count up to three.</p>
<p>And then I have to continue and fall back to my iterative code.</p>
<p>So look at the five node, I see that the five note is already marked as visited, so I don't start traversal.</p>
<p>And I see that the six node, same thing don't need to start traversal seven note already visited, eight nodes already visited.</p>
<p>At this point, I would be done with the entire algorithm.</p>
<p>And there's my final count of three.</p>
<p>So a few interesting mechanics here, right, you're going to need to definitely implement some code or some function that does a traversal through some component as far as possible, then you also need some iterative code just to potentially begin a traversal at every single starting point.</p>
<p>And what you want to do is be sure to mark nodes as visited as you traverse them, because only when you marked a new node as visited and complete that traversal should you increment your count.</p>
<p>You're probably wondering the exact details of how we implement this in some code, but don't worry, you'll realize that it's really just a spin off of our previous graph algorithms in the walkthrough video, but for now, we see that n is a number of nodes And he has a number of edges like usual, we know that this is really just traversing through the entire graph.</p>
<p>So we can say the time complexity is just o v, and the space complexity is O of n, right, depending on whether you do a breadth first or depth first, you're going to use that space, then in terms of your stack or cube.</p>
<p>And we can also consider using the space within our set if you use a set to mark your nodes as visited, but overall, it still will lead to a linear time and linear space solution.</p>
<p>Alright, I think I'm ready to code this one up.</p>
<p>I'll see you in the walkthrough video.</p>
<p>Hey, programmers, Alvin here, right, now let's go over a JavaScript solution for this connected components count problem.</p>
<p>And so we'll implement exactly the strategy we spoke about in the approach video.</p>
<p>So make sure you watch that first, we know that this is going to require really two different mechanisms are going to need our interactive code just to hop to different connected components.</p>
<p>And we also need some traversal code to just explore some single component as far as possible.</p>
<p>And so what I'll do here is let me start with the iterative code.</p>
<p>So I need to begin a traversal at every potential node.</p>
<p>So I can say for let node of my graph really say in my graph here, because for this problem we're given looks like JavaScript objects.</p>
<p>So if I say for let node in graph that would give me each of these keys like 015, and so on.</p>
<p>And so for every node of the graph, what I want to do is begin a traversal.</p>
<p>So we're going to assume I have a function here, I'll call it explore.</p>
<p>I'm gonna pass in, of course, the graph, as well as that node.</p>
<p>And what I want that function to do is do like a, we'll say, a depth first traversal, from that node as far as possible, right, so probably going to need to add more logic into this main function.</p>
<p>But for now, I think it's about time to actually flesh out explore.</p>
<p>So I'll choose to do this explore method recursively.</p>
<p>So we'll define explore, it's going to take in a graph, as well as my current node, I'll just call it current, right.</p>
<p>And then from there, I want to solve this one, using a depth first.</p>
<p>So recursion is fine.</p>
<p>And not much to do here, but really go through my neighbors want to iterate through every neighbor of this node.</p>
<p>So I can say like neighbor of graph of current, I recall that graph would be an adjacency list.</p>
<p>So if current is spread this out.</p>
<p>So if current was a node like eight, then on the first iteration neighbor would be zero, next iteration neighbor would be five.</p>
<p>So here, I'm just going through all the neighbors of my current node, I just need to not traverse to them.</p>
<p>So I can call explore, pass along the same graph, that doesn't change.</p>
<p>But now my new current node would be that neighbor, just like that, and this will perform the baseline of just the kind of depth first traversal.</p>
<p>But we need to also mark things as visited, like we said, in the approach video, that's a really important a part of the solution.</p>
<p>And I want this like visited set to be global for my entire traversal.</p>
<p>So I'm gonna have to create it, maybe my main function over here.</p>
<p>So I can create my constant visited, make it a JavaScript set, because JavaScript sets off for me O of one lookup, and o of one addition, I can pass this visited set my reference until all of these calls over here.</p>
<p>So I know I'm gonna receive visited over here now.</p>
<p>Now I want to actually start using visited.</p>
<p>So a few things to note, right, I definitely want to use visited to prevent cycles, right? That's one of the main reasons we always had visited to our graph traversals.</p>
<p>So some familiar code here.</p>
<p>If I've already visited this node, so if visited, has this current node, then nothing much to do here, maybe just return false.</p>
<p>Later on, we'll see.</p>
<p>The really cool trick we use here by returning false, right, actually serves two purposes.</p>
<p>return false because this might be a cycle.</p>
<p>And then I need to make sure that I pass as visited set along over here as well.</p>
<p>Nice.</p>
<p>And let's say that we have a current node that is not visited.</p>
<p>So this statement is false.</p>
<p>Well, then, it seems to be that we're visiting this node right now.</p>
<p>So now we should add it into the visited set.</p>
<p>Nice.</p>
<p>And then beyond that, we need to make sure that our explorer function is consistent in its type, right? So I'm going to have my explorer function do is it's going to return true whenever it explores like a new node return true.</p>
<p>So if you take a look at this code, for my function to hit this line 17 return true, then it must be the case that it has already finished exploring all of its neighbors, right, because I know that this for loop does the job of exploring all of the neighbors, right? So only after all of those neighbor calls returned.</p>
<p>Will I return true? And that must mean that I've explored this component as far as possible.</p>
<p>Right? And that seems good to go.</p>
<p>And what I can do is now in my main function, when I call explore it, now it's going to give me boolean data, right? If it's exploring a new island, or a new component, it's going to return true.</p>
<p>So I can check.</p>
<p>All right, if explorer returns true, then that's a new component.</p>
<p>So I can probably increment some count here, I should have created.</p>
<p>So I'll say 11, counts equals zero, I'm going to increment that count, when I find a new component and plus equals one by the end, I should of course, return that counts.</p>
<p>And what you'll notice is, for scenarios where we, let's say iterate into a node that we already explored, when I make this call, I know that that call is going to return false, because if something's already explored, it would have been added to visited.</p>
<p>So that's why I'm using some Boolean return values for this recursive function.</p>
<p>So that code is looking pretty good.</p>
<p>I think at this point, we might be ready to test this one, let's give it a shot here.</p>
<p>So some pretty tricky codes, not very long.</p>
<p>And this is a really core pattern here.</p>
<p>Looks like I'm getting an error, we have something wrong here.</p>
<p>So looks like the answer should have been two, but I gave back seven.</p>
<p>So I'm counting way too high.</p>
<p>So what I'll do to debug This one is really just maybe print out my visited.</p>
<p>So this is a very common mistake in JavaScript want to bring in, I think this example, I could test it manually.</p>
<p>What I want to be sure to do is maybe at every iteration of, let's say this this for loop, I console dot log with visited associate visited changes every time.</p>
<p>And I'll run this manually by just hitting run.</p>
<p>And let's see what we get here.</p>
<p>So a few things to note, it looks like some of our keys, or some of our items of the set are strings or the zeros a string.</p>
<p>And other times they're actually numbers, notice that they're missing quotes, that has to do with, you know, kind of just JavaScript objects, technically, keys of a JavaScript object are going to be always converted as strings, although the data within these arrays over here is going to be number.</p>
<p>And sets can actually store both types.</p>
<p>And so if you have like two different types, it's not gonna be able to figure out like that those really represent the same node.</p>
<p>For example, looking at this visited set over here, I have like the number one, as well as the string of one, which is no good.</p>
<p>So let's just convert them all to maybe strings.</p>
<p>So I'll check visited if it has the string version of my current node.</p>
<p>So I'll just do the conversion for me.</p>
<p>And likewise, I want to add the string version of the current node over here.</p>
<p>That way, I have very consistent types.</p>
<p>So let's run that manually, again, should just see all of our strings now.</p>
<p>Awesome.</p>
<p>And I think we can run all the test cases.</p>
<p>So that's a really important thing to watch out for in JavaScript.</p>
<p>And JavaScript is pretty unique in that regard.</p>
<p>It just automatically converts all of your keys into strings.</p>
<p>Awesome.</p>
<p>All right, programmers, it's all I got for this connected components count problem, what you want to do is really practice this problem.</p>
<p>It's actually a very, very common interview question.</p>
<p>And there are many variations of this problem that we're going to do in the future.</p>
<p>Hey, programmers, Alvin here, right? Now I want to go over an approach we can use for this largest component problem.</p>
<p>So in this problem, we're going to take in a graph, just like we've been doing as of late.</p>
<p>And the first thing you should probably do is think of this graph as a picture.</p>
<p>So hopefully, you drew it out.</p>
<p>So you can really understand what this is asking.</p>
<p>Our graph information is already given as an adjacency list.</p>
<p>So it's pretty easy to draw out.</p>
<p>So since I have a graph like this, the first thing I should notice is it could contain multiple components, right.</p>
<p>So here, I kind of see two separate islands, two separate components.</p>
<p>And I want to consider the sizes of each respective component.</p>
<p>So if I look at my first component, spanning the nodes, 015, and eight, I know that they have a size of four, they're the four represents the number of nodes within that component.</p>
<p>So I'm really interested in a number of nodes have a component, not necessarily the number of edges.</p>
<p>If I look at the other component that spans the nodes, two, three, and four, that definitely has a node group of three.</p>
<p>And this problem really cares about the largest component, so I should just return four, because it's the largest component size.</p>
<p>So when it comes to what this question is asking, you do have some familiar patterns if you've been following these problems in order and of course, I always recommend that you do these problems in order.</p>
<p>So how can we go about solving this one? Well, I know I'm gonna need some sort of iterative code that way I can travel and hop to different components or different islands, I can probably do some depth first traversal variation that also finds the size of a connected component.</p>
<p>So let's step through how this algorithm might run.</p>
<p>On the side.</p>
<p>I'm going to list out my nodes to represent how I'm going to do the iterations to be In a traversal at every node as my starting point, so I'm going to start at node zero.</p>
<p>And since node zero is unvisited right, now, I'm going to begin a brand new traversal, starting at node zero.</p>
<p>And I'm going to mark my nodes as visited as I go, because like usual for our undirected graphs, you want to watch out and prevent any cycles that you may get trapped in.</p>
<p>And I know that this depth first traversal, is going to explore this full region as far as possible.</p>
<p>And by the power of recursion, it'll be pretty easy to implement some pattern that can count every node as we traverse through it.</p>
<p>So I'm going to treat each of these nodes as just being a single note, of course.</p>
<p>And eventually, those ones are going to return to my top level call, in which case, I can add them all up, getting me a grand total of four.</p>
<p>If this feels very hand wavy, and you're wondering, like how the heck are we going to code up that pattern, don't worry, it's actually a pattern we've seen before.</p>
<p>And so I'll cover that in detail in the code.</p>
<p>Just know for now, it's actually not a big deal to get the count of nodes, right.</p>
<p>So now that I know that the size of this component is four, what I should do is I guess store it as my current largest island or component I've seen so far, because it's the first component that I've considered.</p>
<p>At this point, I should fall back to my intuitive code.</p>
<p>So I look at the node of one, what I should notice is this node one is already checked off, it's already visited.</p>
<p>So there's no reason to start another traversal from this node, because if it's visited, that means I have already explored the component that node one is a member of, so I can basically skip it, go on to node two in my iteration, since node two is unvisited, I should begin a new traversal.</p>
<p>Over here, I know that this depth first traversal is going to explore that component as far as possible, it's going to go ahead and count all of those nodes as one.</p>
<p>And eventually some of those counts together, giving me a count of three.</p>
<p>And so this next component has a size of three, I need to compare that three against my current largest four, obviously, the four is bigger, so the four gets to stay as the largest.</p>
<p>When I fall back to my iterative code, I get to my note of three threes already visited, so no reason to start anew.</p>
<p>traversal, four is already visited, so nothing to do, five is visited.</p>
<p>And of course, eight is visited as well.</p>
<p>At this point, we're done looking at every single node within our graph, and we must have explored every single component, so we can just return the final value that we have stored in that largest variable.</p>
<p>Awesome.</p>
<p>When it comes to the complexity of this algorithm, it's pretty straightforward.</p>
<p>It's basically exactly all of the algorithms we've seen so far, we see that n is the number of nodes and e is a number of edges, we know that the time complexity is going to be roughly o of the number of edges really just exploring through the entire graph, we can also see that the space complexity is also going to be linear, really just O of n.</p>
<p>Because through all of this, we're probably going to be storing all of our nodes in a set right to track visited.</p>
<p>And depending on how you implement your traversal algorithm, whether you use depth first or breadth first, you're also going to use a linear amount of space through your stack or your queue.</p>
<p>So overall, we're looking at a very efficient, linear solution.</p>
<p>And so with that, I think I'm ready to code this one up.</p>
<p>What I want you to do though, first is possibly give this one a shot on your own first cluster, really just utilizing some code that we've seen in the past.</p>
<p>So give it a go on your own.</p>
<p>If you get stuck, you can find me in the walkthrough video.</p>
<p>I'll see you there.</p>
<p>Hey, programmers, Alvin here, right now let's go over a JavaScript solution for this largest component problem.</p>
<p>So this problem is going to be really just a spin off of our last problem.</p>
<p>So we'll hop right into it.</p>
<p>And as always, make sure you watch the approach video first.</p>
<p>And we'll start by building our code that will help us start a traversal on disconnected islands here, right? This is connected components, we should say.</p>
<p>And so I'll start my iterating through every node of the graph, that means I just iterate through the keys of my input object here.</p>
<p>Because remember, we're given this graph as already an adjacency list.</p>
<p>So I can say for let node in the graph.</p>
<p>So I'll give me the nodes like 015, and so on.</p>
<p>And what I'll do is I'm going to start a traversal here, right? So we're going to pretend I had a function, I'll call it explore size.</p>
<p>And if I give it the graph information, as well as the node that I want to traverse through, hopefully, it actually does a traversal through that entire connected component, right.</p>
<p>And what I'm going to assume is, let me assume that this function actually returns the size of that entire component.</p>
<p>So that would be a number right, representing the number of nodes in that component.</p>
<p>And so if I have that should receive it here, call it size.</p>
<p>And I know I need some like max value logic for this entire for loop.</p>
<p>So I'm going to create longest, initialize it to zero.</p>
<p>And then from there, I can check.</p>
<p>All right, if the size of the component I just found, if it's bigger than the longest, then I can replace the longest simply longest equals size, that after the for loop, I would just read Turn the longest course I need to write this explore size function.</p>
<p>So I'll implement this as a type of depth first.</p>
<p>So I'm going to make it recursive, as for size, taking the graph, as well as our current node.</p>
<p>And a few things I should watch out for here, they tell us that we have an undirected graph.</p>
<p>And so we need to make sure that we avoid any cycles.</p>
<p>So we're also set up here is some classic structure, I'm going to use a visited set, we're going to use a set because it gives me O of one lookup and o of one insertion.</p>
<p>So now that I have my visited set, I can pass it along, as I start the traversals.</p>
<p>And now let's work on a base case, as well do to get going is check if I visited this node already.</p>
<p>So if the visited set already has this current node that I need to return, basically avoid a recursive call.</p>
<p>But I also want a consistent type here, right, so I'm assuming that this function gives back a number representing the size at some point in my traversal.</p>
<p>If I get to a node that has already been visited, that means I counted it already.</p>
<p>And so I'll treat it as zero right now, because I don't want to double count my nodes, right otherwise would be inaccurate here.</p>
<p>And now beyond that, what I can do is maybe create a variable here, I'll call it size, I'm going to set that equal to one to represent the current node I'm on right now, right? If this condition is not true, then it's the first time I'm seeing this node, so I need to count it.</p>
<p>And we'll also be sure to do is add it to visited that way I don't get into a cycle into the node later on.</p>
<p>Nice.</p>
<p>And at this point, I need to make my recursive call on the neighbors of this node.</p>
<p>So like we usually do could say for let neighbor of graph of node.</p>
<p>So remember your shape of data here.</p>
<p>So if node was a key, like five, when I say, Neighbor of graph node, that would iterate through the neighbors a five, zero, and then eight, and so on.</p>
<p>And so here, I make my recursive calls, I'm gonna call the same function explore sighs, pass along the same graph.</p>
<p>But now you're situated at your neighbor, and you can provide the same visited set.</p>
<p>And here's where I do my recursive leap of faith, right, I'm going to assume that this explore size function is working.</p>
<p>So if it was working, what would it give back, it would give me back a number representing the size of that graph, right beginning at my neighbor.</p>
<p>So whatever number I get back here, I just want to increment my size by that, right.</p>
<p>And that would accumulate a basically a count of all of the nodes in this fully connected component.</p>
<p>And after I'm done exploring my neighbors, I would have explored the entire component fully.</p>
<p>So I can just return my final answer, which would just be the size over here, really important thing you need to do is make sure if you follow this kind of strategy, you start your size equal to one, and you add to it over time, because this one represents the current node that I'm at, I know that every call is going to count its own node.</p>
<p>So over time, this will actually accumulate everything I need.</p>
<p>So feels pretty good, have our nice visited logic.</p>
<p>And we already wrote our main function here.</p>
<p>Notice how we're splitting up this code in a nice little helper function here, I think it's the best way to express this, it's very similar to some previous problems that we've done.</p>
<p>Right, I think at this point, let's go ahead and give this a shot.</p>
<p>See, what we get, should be able to put it through a few different test cases.</p>
<p>Nice.</p>
<p>And there, we have the largest component to problem.</p>
<p>So a few things, I want to draw your eye to remember that for your graph problems, or you have disconnected components, you're going to need not only your traversal code, but some just iterative mechanism, usually just a loop to make sure you can hop to different components, right? Because if you only had your regular like traversal function, by definition, there is no edge between separate components.</p>
<p>So you would never be able to explore the full graph.</p>
<p>Otherwise, alright, programmers practices, and I'll catch you in the next one.</p>
<p>Hey, programmers, Alvin here, right.</p>
<p>Now let's go over an approach we can use for the shortest path problem.</p>
<p>So here we have another graph problem, and your graph is going to be given as an edge list.</p>
<p>So the first thing we should probably do is, of course, visualize this graph.</p>
<p>And in the context of your code, it probably would be best if you convert it into an adjacency list.</p>
<p>Since we've seen that pattern a few times in some recent problems.</p>
<p>I'll leave that part to you.</p>
<p>But we're going to end up with a graph that looks like this.</p>
<p>And in this problem, we're also going to be given a two nodes here, let's say W and z, what I want to do is return the smallest path between these two nodes.</p>
<p>And here I have two obvious paths, right? One way I can get from W to z would be to go through x and y.</p>
<p>And there I can see that that path length would be three.</p>
<p>Do note here that we're going to consider the path link as the number of edges within the path.</p>
<p>So not the number of nodes, right? So that means how do I calculate three here? What's really just three lines, right, three edges.</p>
<p>That's one way to get from WC another obvious way to get from W to z would be to go through VI, which case, I would only need to use two edges.</p>
<p>So that path line is of course two.</p>
<p>And this problem, what I want to do is return the smallest possible path length.</p>
<p>So I should return the final answer of two here.</p>
<p>So we know that this problem is going to require us to do a graph pathfinding algorithm.</p>
<p>The question is, which one should we take, we either can choose, of course, a depth first traversal, or a breadth first traversal, I'll cut to the chase here.</p>
<p>And both of them would actually give you a strategy that works, meaning you can solve this with either a depth first or a breadth first strategy.</p>
<p>But maybe one of these algorithms would be better than the other.</p>
<p>So let's consider the possibilities.</p>
<p>So let's say I had some large graph, well think abstractly right now.</p>
<p>So kind of just looking at an abstract example.</p>
<p>And let's say I was stepping through some depth first traversal.</p>
<p>Let me say I have my starting node in yellow, and I'll have my target node in blue.</p>
<p>So what I want to do is, again, figure out what's the minimum path distance between these two nodes, obviously, you know, just in the long run, you should get an answer like two here, right, because two is definitely the shortest path between these two nodes.</p>
<p>If we did a depth first traversal, I know that depth first would force me to look in one direction as far as possible, until I have to switch directions, right.</p>
<p>So for my starting on yellow, let's say we move to the right, that'd be one edge and move to the right again, two edges move to the right, again, three edges.</p>
<p>At this point, I can't move right anymore.</p>
<p>So let's say you move downward, so at 456 have to switch directions, again, seven, eight.</p>
<p>And at this point, we kind of already see that this is going to end up possibly getting to the blue target node.</p>
<p>But that wouldn't be the shortest path.</p>
<p>Something unfortunate here is although my star and nodes are really close together, a depth first traversal could be unlucky in that it may search in a totally wrong direction, and snake all the way through the graph until it eventually finds my target node, at which point I definitely don't have the shortest path.</p>
<p>So I think a breadth first traversal is going to be more useful here.</p>
<p>So let's say start at my green node, still my same starting point.</p>
<p>And if I did a breadth first traversal, I know that breadth first means I'm going to explore all the directions very evenly.</p>
<p>So it would look like this.</p>
<p>So I would explore all nodes one edge away from my starting point.</p>
<p>And then from there, I would begin to explore all nodes two edges away from my starting point.</p>
<p>And at some point, I'm going to hit my target node.</p>
<p>And if it's the first time I'm seeing my target node, then by definition, I must have just found the shortest path, right, the shortest path would just be two.</p>
<p>So that's my high level argument for why a breadth first search is going to be more useful, in my opinion, for this problem, let's step through this process a little more algorithmically.</p>
<p>So let's say I had my original graph.</p>
<p>And if I'm gonna do a breadth first traversal, I know that I have to use a queue right no matter what a queue is what gives you that breadth first order.</p>
<p>And what I'll do is eyes the items of my queue, I'm going to store not only the nodes, but also the distance from my starting point, that means I'm going to initialize my starting note on the queue along with the distance of zero.</p>
<p>And that represents the fact that all right, that note of W is zero edges away from the starting point, because it itself is the starting point.</p>
<p>So at any point in time, the items of my queue are always going to be pairs, right of node comma distance.</p>
<p>So now we're going to begin our general algorithm, I'm going to keep iterating.</p>
<p>While my queue is not empty, a single iteration of breathless would remove the front end of my queue, and I'll label it as my current node.</p>
<p>At this point, I should check Alright, is my current node of W, the thing I'm looking for? It's not, so I need to explore W's neighbors.</p>
<p>So I can look at the x node.</p>
<p>And I know I need to add it into my queue.</p>
<p>But when I add it into my queue, I want to make sure I tag it with a distance.</p>
<p>So if my current node has this zero, I know that a neighbor of this node would have distance one, so I just increment the current distance by one.</p>
<p>So onto my queue, I put an item that says x comma one.</p>
<p>And I have a similar scenario for this V node.</p>
<p>It's also a neighbor of W.</p>
<p>And so I put v comma one on my queue as well.</p>
<p>At this point, I can go to my next iteration, or move the front of my queue.</p>
<p>So I look at the x.</p>
<p>And then I look at X's neighbors do bear in mind that because I have an undirected graph here, x really has two neighbors, right, it has w as a neighbor, as well as y.</p>
<p>So something you should already know is I need to track visited.</p>
<p>In other words, when x is going to consider its neighbors, it should really only care about the Y, right, I don't want X to put w back on the queue, because then I would get an infinite cycle.</p>
<p>So I'm just gonna look at the Y over here.</p>
<p>I'm going to add it to my queue.</p>
<p>Because I know my current note of X has a distance of one y must have a distance of two always just incrementing the distance by one.</p>
<p>Cool.</p>
<p>And then I carry on with this algorithm.</p>
<p>I removed the front of my queue now, which would be the V note.</p>
<p>And at this point, I can consider V's neighbors, and I do See that one of its neighbors is actually the Xena, that's the only unvisited neighbor, I'm going to be sure to add z into my queue and tag it with a distance of two, right, because if my v has distance one, its neighbor would have a distance of one grader.</p>
<p>At this point, you can already see how this algorithm is going to work out.</p>
<p>Eventually, this z nodes going to leave the queue, and that would actually be my target node.</p>
<p>So since I've added a node into the queue that matches my target, I know I have my final answer.</p>
<p>The two here does represent the number of edges we took in that logical path.</p>
<p>And I would, of course, just return that too.</p>
<p>So for the most part, this algorithm just sounds like a classic breadth first traversal.</p>
<p>Using a queue on a graph, the only interesting bit is now we're also going to track the current distance.</p>
<p>You know, when it comes to counting the length of a path, you need some counting mechanism.</p>
<p>And so if you begin your queue with your starting node with a distance of zero, every time something leaves a cube, and adds its neighbors, it should increment that distance by one.</p>
<p>And like you already guessed, this algorithm is pretty efficient, because we don't have to traverse through the graph more than one.</p>
<p>So we'll see that this has a linear complexity.</p>
<p>Alright, I think I have everything I need to code up this one, I'm sure you're wondering about these implementation details.</p>
<p>So what you want to do is possibly give this implementation a shot on your own.</p>
<p>And if you need some help, you can find me in those walkthrough videos.</p>
<p>See you there.</p>
<p>Hey, programmers, Alan here, right.</p>
<p>Now let's go over a JavaScript solution for the shortest path problem.</p>
<p>So we'll jump right in, hopefully, you watch the approach video.</p>
<p>And so we'll start by converting our edge list input into something more useful for our traversal like an adjacency list, we're going to write a very classic function.</p>
<p>When I call it build graph, like you expect it takes in the edges.</p>
<p>And I want it to return an adjacency list.</p>
<p>For me, that means a JavaScript object, I'll call it graph, by the end of this function, this will help I'm going to return the graph and some common code, I'm going to iterate through every pair, right, basically every edge, I'll say, for left edge of edges.</p>
<p>As I'm iterating, through every edge, when I want to do is unpack that edge into its component nodes, I'll call it a and b.</p>
<p>And now I can start formatting my adjacency list.</p>
<p>So I know I want the keys of this graph to be obviously the nodes, I want the values to be an array of the neighbors of that node.</p>
<p>So what I'll do is, it's the first time encountering a node, I'll check.</p>
<p>Alright, if this a node if it's not in the graph yet as a key, then I should create it for the first time.</p>
<p>So use it as a key and initialize its value to an empty array, basically, at the start is going to have no neighbors.</p>
<p>Likewise for B.</p>
<p>And then, at this point, I know that A and B now definitely exist as keys within the graph.</p>
<p>And so I just want to add those neighbors.</p>
<p>So if I have an edge, like w comma x, I know x is a neighbor of w, and w is a neighbor of x.</p>
<p>So simply put in say, graph a dot push B, and then just the inverse of that should be good to go.</p>
<p>Cool.</p>
<p>So that should give us our graph.</p>
<p>Let's go ahead and use that in our main function now.</p>
<p>So we'll just say graph equals build graph on the edges.</p>
<p>And what we want to do now is actually work in our breadth first logic, like we said from the approach video.</p>
<p>So a few things I'm going to do, I'm going to definitely set up my queue, we said that the key to victory here was to not only store the node in your queue, but for every like frame inside of your queue also store its distance from node A.</p>
<p>So I'll just use like a pair of things.</p>
<p>So the elements of my queue are going to be always a pair.</p>
<p>And I'll throw on the initial node A, and also the number zero, because at the start, right, this node A is zero edges away from itself.</p>
<p>So that's good to go.</p>
<p>And over time, I'm going to be incrementing.</p>
<p>This number, it seems nice.</p>
<p>And so let's keep on keepin on here.</p>
<p>All right, a while loop, classic condition would be all right, while your queue is not empty, then I shall remove something from the queue.</p>
<p>So always remove from the front if you want to follow a true breadth first order.</p>
<p>So I can do do dot shift.</p>
<p>And that will give me back an array or give me back one of these sub arrays here.</p>
<p>I know it's always going to be a pair so I can just unpack.</p>
<p>And I'll just say alright, grab the current node as well as the distance.</p>
<p>Nice.</p>
<p>I'm going to check the node here that I just removed from the queue.</p>
<p>If that node is node B, that I must have just found a path and I know the distance in that path, I can just return it.</p>
<p>But if this condition is not true, then I need to keep searching through my graph.</p>
<p>Since that means I need to add this nodes neighbors to the back of the queue.</p>
<p>So I'm going to iterate remember that we have adjacency lists the entire time.</p>
<p>So I'm going to say, for, let's say, Neighbor of graph of node.</p>
<p>So get all the neighbors of this node.</p>
<p>And what I'll do is just add those neighbors into my queue.</p>
<p>So q dot push, neighbor, try to remember what the form of our graph is over here.</p>
<p>Maybe as a quick little spot check, make sure on the same page, let me just console dot log, the adjacency lists, let's say we took this example manually, just paste it down below.</p>
<p>And I'll just give it nice little manual runs, I'm not running the test cases quite yet.</p>
<p>So we converted this edge list into this adjacency list, right.</p>
<p>And when we say no to something like W, when we say graph, square bracket, no, that would give us this array, co authored sorters, iterating, through all the neighbors of this node and adding them to the queue, one thing we should watch out for is when we push things back onto the queue, we want to maintain the same format.</p>
<p>So I actually still want to maintain pairs.</p>
<p>So I'll make the first element of the pair, the neighboring node on the second element needs to be the distance.</p>
<p>And since it's a neighbor, its distance would be plus one over here.</p>
<p>So that's how I'm growing and counting the distance.</p>
<p>So let's give this a test run.</p>
<p>There are a few things we need to work on still, though.</p>
<p>But we'll pass a few of these examples, at least until we timeout on a particular example.</p>
<p>One thing this code is missing is any cycle prevention, right? I know that it's going to be a very common scenario, because I have an undirected graph, right.</p>
<p>And so what I'll be sure to do is maintain a visited set, sort of pattern that you're used to, we're just gonna implemented for our iterative, breathless right now.</p>
<p>So start out with a set.</p>
<p>And when you do this iteratively, the move would be to make sure that if something is added to the queue, it should also be marked as visited.</p>
<p>So if I initialize my queue with node A, then I also want to initialize my visited set with node A, just like so.</p>
<p>So if you're unfamiliar with the set constructor in JavaScript, if you want to initialize it with some values, you actually have to pass in an array containing those values.</p>
<p>So the values of my visited set are just going to be the nodes write the node IDs.</p>
<p>Cool.</p>
<p>And then I want to work that logic into my while loop.</p>
<p>And so whenever I'm about to add something into the queue, that is, I'm going to add a neighbor into the queue, first check if that neighbor is not visited yet, so only if not visited has neighbor.</p>
<p>Right, so only if this neighbor has not yet been visited, then I should add it to my queue.</p>
<p>And if I'm about to add it to the queue, like we just said anything that interest, the queue should immediately be marked as visited.</p>
<p>So here I'll say visited, add, the neighbor net should avoid adding any particular node more than once into the queue, avoiding any cycles.</p>
<p>Awesome.</p>
<p>So that feels pretty good.</p>
<p>Let's give that a test run.</p>
<p>Now.</p>
<p>We hope to not timeout at least, all that same example, we're actually returning undefined where we expect negative one.</p>
<p>So if you look at the actual prompt, they tell us that, alright, if you can't find a path between A and B, then you should return negative one.</p>
<p>Let's look at an example or test 04.</p>
<p>And you kind of drew it out, you would see that there would be no such path that connects B to G.</p>
<p>The reason we're returning undefined right now is we're gonna finish our traversal mean, meaning our queue is going to empty out.</p>
<p>And then we're just going to hit the end of this function.</p>
<p>And if I don't hit a return line by default in JavaScript, I'm going to get undefined.</p>
<p>So we know if we finish the while loop, and we never found node B, then we can just return negative one, that must mean that there is no such path that connects a to b.</p>
<p>So let's give this a test run.</p>
<p>Now.</p>
<p>This should be our final version of our shortest path algorithm.</p>
<p>Awesome.</p>
<p>So be sure to practice this algorithm before you move on.</p>
<p>And do make sure that you understand the choice of breadth first here over depth first, for most of your basic just graph problems that require you to calculate a shortest path path meaning just the number of edges.</p>
<p>Typically, you'll find breadth first easiest way to calculate that hey programmers, Alvin here, right now let's go over to the approach for this island count problem.</p>
<p>So in this problem, we're going to be given a 2d array representing a grid of land and waters here we have l characters representing land, and W characters representing water.</p>
<p>Let's try to visualize this.</p>
<p>In this problem we want to do is return a number representing the number of islands on the grid.</p>
<p>We're going to consider an island as a vertical or horizontal connected region of land.</p>
<p>So in this particular example, we should return four.</p>
<p>Because there are four different islands, we can label them as such, this is going to be any type of problems for us.</p>
<p>And we should really think about it as if we have a graph, I'm going to refer to these style problems as a grid graph.</p>
<p>And so although we're not given any explicit like nodes and edges, I can still think about positions of this graph as nodes.</p>
<p>So for example, let's consider the indices here.</p>
<p>So I have my row indices along the left hand side, and my column indices along the top.</p>
<p>And I can designate any position of this grid using a pair of row and column.</p>
<p>So for example, if I looked at position three comma four, that would be this position over here.</p>
<p>And what I should do is mentally think about a position as if it's a node.</p>
<p>And if I met some node, I do have some potential neighbors.</p>
<p>given any position of the spread, I have at most four neighbors in the up down left and right directions.</p>
<p>given any position of the grid, it's really easy to determine what our potential neighbors are, it's really just a matter of adding or subtracting one from either the row or the column.</p>
<p>Let's generalize this formula.</p>
<p>So let's say I was at some position, we'll call it our see, if I want it to go upward, that would mean you decrement, the row by one, keep the column the same.</p>
<p>If you went down, that would mean increasing the row by one, if you went to the right, that would be increasing the column by one.</p>
<p>And if you want to go left, then you should just decrease the column by one, do bear in mind that the top left position of our grid is going to be 00.</p>
<p>And that's why we have this type of arithmetic rule.</p>
<p>So now that we're starting to frame this grid problem, as if it's a graph, we can use some common patterns, I know that this problem is really asked me to count the number of connected components or the number of islands on this grid.</p>
<p>So I'm going to need some iterative code, probably some nested loops to just iterate through every potential Island and start some traversal at that island.</p>
<p>So when it comes to our iterative code, we just want nested loops to iterate through every row column.</p>
<p>That means the iterations should look something like this, just moving left to right.</p>
<p>until we finish around which case we can go to the next row.</p>
<p>Let's actually iron out the main logic that we need in our algorithm.</p>
<p>So let's say we start or nested loops from the very beginning, what I do is check my current position, what I want to do is check if my current position is land right now it's water, so I can just continue.</p>
<p>On the next iteration, I do have some land position.</p>
<p>And since I'm on a piece of land, right now, what I want to do is explore this land region as far as possible, probably using some depth first traversal.</p>
<p>And do bear in mind, like most of our undirected graph problems, we're going to need to be sure to mark things as visited, so we don't get trapped in any infinite cycles.</p>
<p>So for example, if I started a traversal, at this position, I can go downward.</p>
<p>But I can also go upward from here.</p>
<p>And I can bounce back between the two going up and down, giving me an infinite cycle.</p>
<p>So we know how to fix this using all of our graph mechanics, right, just use a visited set.</p>
<p>So if I do a depth first traversal, starting at this position, I know I'm going to mark off all of these land pieces as visited.</p>
<p>And what I also want to do is make sure that I increments accounts, representing the fact that I've just explored some new island fully.</p>
<p>So right now, my count zero, since I just finished exploring something now my count is one.</p>
<p>And at this point, I can fall back to my iterative code to scan for another island.</p>
<p>So I move to the right, it's water.</p>
<p>So continue, water continue.</p>
<p>Now I have another island.</p>
<p>And again, I just do some depth first traversal through it.</p>
<p>And of course I increment my count.</p>
<p>This pattern will follow right? Eventually, when I hit the new row, I could be at a land position.</p>
<p>But I should also make sure that this land position is unexplored, right.</p>
<p>So since I'm at position one, comma zero, and this land has already been explored, I don't need to begin a depth first traversal.</p>
<p>And I also don't need to begin a traversal here.</p>
<p>And this continues, avoiding starting a traversal.</p>
<p>Wherever I have a visited piece of land, we know eventually, we're going to hit a new island like this one, where I have a piece of land that is unvisited.</p>
<p>So at that point, that's my criteria for starting a new depth first traversal, I explore this region, increment my count, and continue business as usual until I hit this final island that is unvisited.</p>
<p>And so I visit it and increment my count.</p>
<p>And by the end of my iterations, I should have my final count of four.</p>
<p>So that logic is actually pretty straightforward, just a variation of our classic connected component, counting logic, except now we're adjusting the criteria we use for looking at neighbors, right, our neighbors are actually going to just be either above downward to the left or to the right of our current position.</p>
<p>We talked about the complexity of this algorithm, we should consider the size of the input and the fact that it has two dimensions, right? So if I say that R is a number of rows, and C is a number of columns, well and the iterative codes pretty straightforward, I know that's going to give me r times C iterations.</p>
<p>And if I also consider any potential in depth first traversal I do starting at some land.</p>
<p>In the worst case, I could have one Giant Island, which is also going to be our time to see.</p>
<p>So the overall complexity, it's just going to be our time See, the space complexity for very similar reason is our time see, because imagine that we mark all of these positions as visited, that probably means we'd have to add them to some set.</p>
<p>Right, so we have our time see different positions.</p>
<p>And by the end, I could add each and every one of them into my set, the space complexity of our time.</p>
<p>See also includes any traversal related data structures like stacks, or queues, depending on how you implement this one.</p>
<p>So overall, this is going to be a very efficient solution to solve this one, what you should do is probably give it a shot on your own first, if you get stuck, you can find me in the walkthrough videos.</p>
<p>I'll see you there.</p>
<p>Hey, programmers, Alvin here, right now, let's go over a JavaScript walkthrough for this island count problem.</p>
<p>So as always, make sure you watch the approach video first.</p>
<p>And we'll jump right in.</p>
<p>So we know that this is really just a spin off of our kind of graph connected components problems, except now we have a grid graph, right? I can still think about like this grid as if it's a graph, because if I think about any particular position of this grid, I know I have some neighboring positions that I can travel through mainly, my four neighbors Up, down, left and right for me, let me start my laying down some iterative code that can begin a traversal at every node or every position of this grid.</p>
<p>That way, I can start considering different islands, right.</p>
<p>So I'm going to use just a for loop for this, I'm going to iterate through every possible row column combinations every position.</p>
<p>So I'll say R equals zero, iterate up to the length of the grid, so grid dot length to our plus equals one, and do something very similar for my columns nested inside, right? Watch out for some details here though, looking at the examples, we can't actually assume that we're always get a square shaped grid square meaning like as if the number of rows was the same as the number of columns, because sometimes I'll have like an asymmetric grid occasionally, right? If I look at this very first one, it looks like the width is going to be five here, but the height is six.</p>
<p>So separately for the columns, I want to reference the column lines over here.</p>
<p>So we're gonna say grid, zero length.</p>
<p>Nice.</p>
<p>And so at this point, I have some row composition, I want to begin a traversal, let's say a depth first traversal at that position.</p>
<p>So here's where I invoke some like helper function, that will make it a little bit, I'll call it explore.</p>
<p>And what's going to do is, of course, taking the grid information, as well as the row column I want to traverse through nice.</p>
<p>And at this point, I think we'll actually hop to building this this helper function, then we probably need to fill out some more logic within our main driver function here.</p>
<p>So let's bake this explore helper function.</p>
<p>So taking the grid and your row column, and something I should also consider is because I know that this is really a type of graph problem, right? I want to prevent infinite cycles, right? So consider this, let's say I was somewhere in the middle of my traversal, let's say I was at this piece of land, I know that this piece of land is going to travel through its right neighbor.</p>
<p>And it could be the case that this piece of land now travels its left neighbor, so I go left and then right and then left and right.</p>
<p>Now it gives me an infinite loop, right.</p>
<p>So whenever you have this notion of like undirected graph or undirected connections, then always guard with a visited set.</p>
<p>We've seen this pattern before.</p>
<p>So maybe up top globally, for the entire traversal, I'll create a visited set.</p>
<p>So in JavaScript, just a new set, you're probably wondering, you know, what am I going to make the members of this set? Well, I need to designate positions, right? Think about it as if positions are like the nodes in this grid in this graph, right.</p>
<p>And so what I'll do is pass along this visit set, so I can accept it as an org over here.</p>
<p>And when it comes to using your visited set, what you want to do is make sure you combine your row and column because together they designate your actual position.</p>
<p>I think this is actually worth going through specifically more of like a language thing in JavaScript, compared to other programming languages.</p>
<p>So quick aside over here, let me get myself some more room might be a while.</p>
<p>Because if you're unfamiliar with sets, and you don't kind of know, their nuances, might actually hit you in the butt later on.</p>
<p>So let's say I had a set so I'll create an offset.</p>
<p>So can you set and let's say I added I don't know, like an array containing a row column position.</p>
<p>So I'm gonna say is, alright, maybe I had position, I don't know, one comma three.</p>
<p>And I added that into my set.</p>
<p>So I do s dot add that position.</p>
<p>This is actually a common gotcha in JavaScript.</p>
<p>If you put any like reference types, like an array or like an object into your set, it's actually going to check for reference equality when you check for existence later on.</p>
<p>In other words, now I can't really do console dot log s dot has one three, because this array literal is technically a different array in memory.</p>
<p>So I wish I could get like true back in this scenario, but I'm not going to get a true.</p>
<p>So we'll just run that manually see what we get.</p>
<p>So like, we say, we're gonna get a false here, which is not so good.</p>
<p>So instead, your Fix would be to actually convert this into some string data.</p>
<p>So instead, maybe write as if you had one comma three, because strings are primitive types, and I would actually be able to store that string.</p>
<p>So whenever I say the string literal, this would actually give me a match now, so I should get a nice true here.</p>
<p>Awesome.</p>
<p>So we'll want to use that pattern to our advantage.</p>
<p>And so maybe I'll start by creating some position variable, that's going to be like the string of FIDE a version of our position.</p>
<p>So just take my row, maybe add a comma, and also put the column here.</p>
<p>Nice.</p>
<p>And the reason I want to comma separate is, I need to have different bounds for my row and column.</p>
<p>In other words, imagine I had a row of let's say, 12.</p>
<p>And I had a column of four.</p>
<p>If I turn that into a key, or a position, that would give me position as looks like 12, comma for another scenario, let's say I had row one, and then column 24, that would give me a position of this right? one comma 24.</p>
<p>Right, it's really important that you put a comma to separate your row and column positions, because imagine, I didn't put the comma, then it would have a collision here, I have two totally distinct positions, right? 12, four, and 124.</p>
<p>And if I don't put a comma, they look like they have the same position key.</p>
<p>So that's why I need to comma separate them.</p>
<p>Common gotcha there.</p>
<p>But now that I have this position, I can use it to my advantage in this visited set.</p>
<p>So if I've already visited this position, so if my visited has this position, then I should exit, right, I need to return something.</p>
<p>And I want this explorer function do something similar, like we've done in our old component problems, I want it to return a Boolean indicating whether or not this is a new island that I'm exploring.</p>
<p>So if it's visited already, that's definitely not new, right.</p>
<p>So just return false, meaning it's not a new island.</p>
<p>If I make it past this if statement, in other words, if position is not in visited, that I need to mark it as visited right now, second, do visited, add this position.</p>
<p>So now I have my core like cycle prevention logic.</p>
<p>Beyond that, I have a few other scenarios, we know that in our traversal, we're going to look at our different like neighbors.</p>
<p>And so what I want to do is make sure that I'm in bounds here.</p>
<p>So I'm going to check, like to split this up into variables, I'll say, one, a boolean variable called row in bounds.</p>
<p>And I'll do is just check if zero is less than or equal to the row.</p>
<p>And that row is strictly less than will say, the length of my grid.</p>
<p>So I'm just checking to see if my opposition is in bounds here, I do a quick check, I need to be inclusive with zero because zero is a totally valid index, right? I need to be exclusive with the length because imagine I had a grid with length five, it's last valid index is four.</p>
<p>So I need to be strictly less than here.</p>
<p>And I'll write a similar variable for my column in bounds, just like this.</p>
<p>And at this point, I can write a nice semantic if statement check, all right, if your row is not in bounds, or your column is not in bounds, then exit, right? So return like before I can return false, right? Because I should not consider like an invalid position and a balanced position as an island, right? So that's looking good.</p>
<p>Final base case I need though is, what if my current position is water, right? I only want to do my traversal through land.</p>
<p>And so I'll add another statement for that.</p>
<p>So up here, I can check.</p>
<p>All right, if my grid at row column, if it's equal to water, then also return false.</p>
<p>No reason to count it, it's really important that you put this in bounds check before you index into your grid, right? Because imagine that your row and column were out of bounds.</p>
<p>If you write line 15 like this, immediately, you're going to get an out of bounds error.</p>
<p>So start with your guard to check if you're in bounds if you want it to because most of these conditionals they all return false have the same consequence.</p>
<p>You can probably or them together.</p>
<p>Typically I like to keep them separate.</p>
<p>That way I always remember to write them typically for like your grid graph problems.</p>
<p>This is very canonical code.</p>
<p>Alright, so if I make it past all of these base cases, and I have the recursive case, so I must be at an unvisited piece of land.</p>
<p>And when I want to do is do my depth first traversal, right.</p>
<p>So here's where I explore my neighbors and I have four neighbors.</p>
<p>If I wanted to go above that I decrement, my row by one, keep the column the same, pass along the same visited, because remember, we have like the array indices here.</p>
<p>So this is row zero, this is row one.</p>
<p>So we'll lower row numbers mean upward, in the same way, lower column numbers mean to the left.</p>
<p>So this is up, this is down by do just minus one over here, that would be to the left, then plus one on the column would be to the right.</p>
<p>Cool, and I can keep this code very flat as it is something that I'm a huge proponent of when you write recursion, for the most part, I always try to make sure that I don't look before I leap.</p>
<p>In other words, just from this logic alone, it couldn't be the case that row minus one is out of bounds.</p>
<p>But that's okay.</p>
<p>Because if it's out of bounds, when I evaluate this call, it's going to immediately be caught by this base case, right.</p>
<p>And if I express my logic like this, if I don't look, before I leave, if I just leap and then catch myself with the base case, you don't have to write repetitive code.</p>
<p>In other words, some people write code like this, where it's like, Alright, if row minus one inbounds kind of using pseudocode.</p>
<p>Here, they would have to write row plus one inbounds.</p>
<p>And you would have to write a guarding if statement around every recursive call, instead, just write one base case.</p>
<p>And you can catch all of these different out of bounds, right.</p>
<p>So that's why I prefer it this way.</p>
<p>And so I know that by the time I return out of these recursive calls, I'm back at this segment of my code.</p>
<p>And what I can do is return true because I must be finished with that traversal.</p>
<p>And the reason I'm returning true is true symbolizes that I've just finished exploring a brand new island, so I need to count it.</p>
<p>Nice.</p>
<p>It's also consistent with the data type, I have Boolean for this explore function.</p>
<p>So for the most part, this looks like really just a spin off of our previous like graph, depth first code.</p>
<p>And now I want to use that boolean data in my main function here.</p>
<p>So here's where I can actually count my islands.</p>
<p>So guess I really need some logic here that says initialize some counts equal to zero.</p>
<p>And whenever you find a new island, increment that count.</p>
<p>So if I just have found a new island, we're going to get back true from this this call, right? Because remember that I'm beginning a traversal, starting at this row column position.</p>
<p>So if it gives me back true, then I can totally increment my count by one.</p>
<p>Notice that whenever I begin a traversal on a position I've seen before, it would have been added to visited before.</p>
<p>So I would return via this if statement on line 21, I return false.</p>
<p>If I return false, then I don't double count that island.</p>
<p>So I do need a combination of both iterative code to potentially leap to different islands.</p>
<p>But I can use a visited set to prevent myself from double counting any particular Island.</p>
<p>So this is looking pretty good.</p>
<p>Let's not forget to of course, return our counts at the end.</p>
<p>Let's give this a run.</p>
<p>This will probably be the first in a series of these like grid graph problems.</p>
<p>Really try to understand how we can think about still a grid as if it's a graph, right? We just have different rules for how we look at our neighbors.</p>
<p>Right? Now, a node is really a position and its neighbors are its four neighbors Up, down, left and right.</p>
<p>Alright programmers, I want you to practice this pattern because we're going to see it in the next few problems.</p>
<p>I'll leave it to you see in the next one.</p>
<p>Hey, programmers outlane here, right now let's go over an approach for this minimum Island problem.</p>
<p>So we're going to be given here a grid containing a water inland really just some characters inside of our grid.</p>
<p>So of course, as always, let's visualize this.</p>
<p>And what I want to do in this problem is return a number representing the minimum Island size, we're going to consider an island, a connected region of vertical or horizontally connected pieces of land.</p>
<p>So for this particular input, our answer should be to looking at our grid, I have three separate islands.</p>
<p>And they all have different sizes, right? sizes, a four, two and five, I just choose the smallest of the islands.</p>
<p>So that would be the two over here.</p>
<p>So how can I actually come up with a strategy for this one, you should already know that this is just a spin off of our previous a grid graph problem, where instead of doing just a count of the number of islands, now I want to find the sizes of islands.</p>
<p>I know to actually look at different islands, I'm gonna need some nested code, but I'm also gonna need some depth first traversal code to explore a single Island.</p>
<p>So overall, this should be a pretty classic strategy for us.</p>
<p>So let's say we start attacking this we know we're going to begin our nested loops in the top left corner And if our current position is water, then we actually don't need to do anything.</p>
<p>next iteration, I have some land.</p>
<p>At this point, I could begin on my depth first traversal.</p>
<p>And I know that I should be marking things as visited to avoid any infinite loops, right.</p>
<p>So by the time this traversal completes, I'm going to mark all of these guys as visited.</p>
<p>But I also wanted to determine the size of this entire island region.</p>
<p>So every time I get a position that is land, I should treat it as one.</p>
<p>And then when it comes to how I implement on my traversal, I can just gather up these ones, right, just add them all up.</p>
<p>So that would look something like this.</p>
<p>And for my top level call for that traversal, I should get an island size of four.</p>
<p>And so if that kind of traversal algorithm, especially how we compute the size of the island, is pretty hand wavy, don't worry that when we actually go through the code walkthrough, it's just a matter of some recursion, and some recursion we've actually seen before in past problems of the course.</p>
<p>But any case, now that I have this island size of four, it's actually the first island that I've seen.</p>
<p>And so I'm going to consider it the mid size so far.</p>
<p>But I need to keep looking in case something is smaller.</p>
<p>So move to the right.</p>
<p>So if it's water, I do nothing, water again, do nothing.</p>
<p>Now I have another islands, I begin my traversal market these as visited.</p>
<p>And when I find the size of this island, of course, it's going to give me two, I compare that to to my current mid size two is smaller, so I store two as the mid size so far.</p>
<p>And we just continue business as usual.</p>
<p>Note that when we get to a piece of land, we really want to make sure that it's land, but also a piece of unvisited land.</p>
<p>So right now on that piece of land, but it's visited, so I should not wear I don't need to start traversal here.</p>
<p>Likewise, for this position.</p>
<p>Eventually, I'm going to hit some new unvisited land, in which case I should begin my traversal at Explorer, this region, and I want to count up all of these pieces of land.</p>
<p>And I should realize that the final size of this island would be five, I can compare that five against my current min, five is bigger, so the size of two gets to stay.</p>
<p>And I can just end up returning the minimum size by the end of this algorithm, basically representing this island of size two, the complexity of this algorithm is straightforward, we should say that the size of our input is r times C, because we have our rows and C columns, in which case a time complexity is simply our time C, right, we have to iterate through every row column within the grid.</p>
<p>And even when we begin a traversal, in the worst case, we could have an island that spans the entire grid, in which case it would also be our C.</p>
<p>Right.</p>
<p>So overall, our full complexities are time c space complexities are time C as well.</p>
<p>And do know that this is technically a linear solution in the size of the grid, right because the grid itself is exactly r times C positions.</p>
<p>So with that, I think we're ready to code this one up and try it on your own first.</p>
<p>And if you get stuck, I'll catch you in the walkthrough videos.</p>
<p>See you there.</p>
<p>Hey, programmers, Alvin here, right now let's go over a JavaScript walkthrough for this minimum Island problem.</p>
<p>So we'll jump right in, make sure you watch the approach video.</p>
<p>As always, this is just a nice spin off of our classic island hopping logic.</p>
<p>But for a grid graph, right.</p>
<p>And so let's start with the iterative code that can help us begin a traversal.</p>
<p>Starting at every different position of our grids, that just means some nested loops.</p>
<p>So start by iterating through all of the rows and columns.</p>
<p>So r equals zero, go up to while r is less than length of the grid, also do our plus equals one and very similar loop for my column.</p>
<p>But do make sure that you reference your inner column line because you could have like a rectangular shaped grid over here.</p>
<p>And what I want to do now is begin a traversal starting at every row column.</p>
<p>So I'm going to assume I have a helper function here that does that traversal, I'm going to call it explore size.</p>
<p>That's because in the long run, I'm interested in the size of that island, right, so like a number representing how big or how many positions that island spans.</p>
<p>So I'm going to pass along the grid information as well as the position.</p>
<p>And I know when it comes to all of these like undirected graph, traversals should probably guard against your loops.</p>
<p>And I have some foresight here.</p>
<p>So I'm going to pass along a nice visited set, which I can maintain globally for the entire traversal because there's only a good reason to explore a position once right.</p>
<p>So I'll create const visited gonna make it my neighs JavaScript set.</p>
<p>And a few reasons for that.</p>
<p>Well, for one JavaScript set, gives me O of one lookup, but also o of one insertion.</p>
<p>So it's going to be a really quick data structure to use.</p>
<p>And from there, we probably have to add some more logic over here to actually do something with the size but for now, I think I'm going to switch gears and actually take a look at building this helper function, right.</p>
<p>So I think the best way to build this traversal is to use is a deaf purse, typically just my go to for problem like this, it's going to take in I know the grid, the row in the column and also visited, I need some a base case is very classic base cases, I'm going to start by checking if this row column position is inbounds.</p>
<p>So my favorite pattern for that is to split up in some variables just makes it easier to read and debug.</p>
<p>So I'm going to say is my row inbounds and just make that like a boolean variable.</p>
<p>So I'll check if, let's say, zero is less than or equal to the row, I need to say and right, and that row should be strictly less than the grid length.</p>
<p>So this Boolean would only be true if it's in bounds, right? And something very similar for my column bounds should be between zero and grid zero length.</p>
<p>Nice just like this, I believe.</p>
<p>And then I can write a nice if statement using both clauses.</p>
<p>So I can say, all right, if let's say your row is not in balance, or your column is not in balance, then you're definitely at a bound.</p>
<p>So you should probably use some base case here, right? So we're all choose to return here is zero, because I want to keep a consistent number, right consistent return type.</p>
<p>That is, I know that this function has a kind of goal of returning the size of the explored islands sizes a number.</p>
<p>So even in my base case, I need to make sure I return some type of number, returning zero to represent that, hey, if this is out of bounds, it's not going to contribute anything into the count of the size, right, which is good to go.</p>
<p>I need some other base case here.</p>
<p>What if my position is inbounds.</p>
<p>But what if it's actually water, I don't want to count that as well.</p>
<p>I only want to count islands.</p>
<p>So land right.</p>
<p>So quick fix, what I'll do is add a new base case, I can check if my grid at row column, if it's equal to the water character.</p>
<p>So a capital W can also return zero.</p>
<p>If you want it to, you can also maybe merge these into like a single if statement, just write a bunch of ORS, I kind of like them separate because it's just easy for me to remember what each of them does write a final conditional have here is alright, if I make it past both of these base cases, it might be the case that this position is land, but it's land I've already visited.</p>
<p>So here's why I work in my visited logic, I'm going to represent a position, like we said in the last episode as really just a string.</p>
<p>So I can put it as the members of my visited set.</p>
<p>So I'm going to say position to have to be the row plus a comma plus the column.</p>
<p>So just representing the position, that's because I can't add like an array into a visited set, and then look it up later.</p>
<p>And so if visited has the position, then it's a duplicate position that I've explored.</p>
<p>So return zero.</p>
<p>Otherwise, it's not been visited yet.</p>
<p>So I must be visiting it right now.</p>
<p>So I can add it.</p>
<p>Nice.</p>
<p>So I have my base cases laid down.</p>
<p>Now I'll need my actual recursive code.</p>
<p>So I'll explore my four neighbors.</p>
<p>By now you should be familiar with this pattern.</p>
<p>So go upwards, a row minus one column pass on the same visited.</p>
<p>So I'm going to explore my up down left right neighbors respectively.</p>
<p>And I do my recursively buffet theory, right.</p>
<p>So what type do I expect back from these calls, they're going to give me back a number representing the size of the island that my neighbor is a part of.</p>
<p>But if my neighbor is part of some larger Island, then I am too because we're connected right to our neighbors.</p>
<p>And so I want to create the grand total of all of these return values.</p>
<p>So I'm going to create some size variable, let's say let size, I'm going to initialize it to one over here, it's going to be one and not zero, because the one represents my current position, my row column.</p>
<p>And whatever these calls return, whatever number I'm just going to increment my size by that number, like so.</p>
<p>Then finally, I can return our total size over here.</p>
<p>So that will do my depth first traversal, because it's recursive, but we'll also tally up the size of this island region.</p>
<p>Cool.</p>
<p>So now that I have a working explore size helper, let's use it in our main function here.</p>
<p>So I'm going to get back a number from this call.</p>
<p>I'll call it my respective size.</p>
<p>And what's great about this logic is if I have a Island or position I've already seen before, and I encounter it again in this this for loop, then I would just return early because I would hit this base case, right? If something has already been visited, just automatically return zero, because I've already considered it, no reason to consider it again.</p>
<p>But now I need my minimization logic, right, I want the size of the smallest Island.</p>
<p>And they tell us in the problem that we can totally assume that your grid contains at least one island.</p>
<p>So I think a great default value here is to use positive infinity so I can set some will say min size variable To be positive infinity, JavaScript, if I make it positive infinity, I know when I encounter any like valid Island size, it's going to be less than infinity.</p>
<p>And it should replace it.</p>
<p>So now I can do some min logic here and check.</p>
<p>All right, if the size of this island is less than the minimum size I have seen so far, then just replace that min size with that island.</p>
<p>Then after I'm done with all of these traversals potential reversals, I'll return my mid size.</p>
<p>So some classic patterns here.</p>
<p>There's one nuance that we're not considering how to run the code, and we can debug it together.</p>
<p>So it looks like we failed example.</p>
<p>00.</p>
<p>So the very first example we expected to answer to, we accidentally gave back zero.</p>
<p>If you look at that first example, it's pretty obvious that Yeah, the minimum size is two representing this island over here.</p>
<p>The reason we're giving back zero is according to our code.</p>
<p>Let's see we're on like the very first iteration, I'm going to respond it, I know that row is going to be zero column is going to be zero, that means my position would be this w over here.</p>
<p>When I make the recursive call, and I pass along position 00, I know that it's going to immediately return zero because that position is water.</p>
<p>And I'm going to check Alright, is that zero, less than infinity it is, so I'm going to replace min size with zero.</p>
<p>But if I think about it, zero doesn't even represent a real Island.</p>
<p>If an island has a size of zero, then it's not an island at all, it was a piece of water, right? And so I want to add some additional logic here to only actually look at nonzero quantities.</p>
<p>So only do the comparison if that size is also valid.</p>
<p>So size should be greater than zero, of course.</p>
<p>And we'll want to add these together.</p>
<p>So let's try that again.</p>
<p>Just a little, little detail over there that we need.</p>
<p>Awesome.</p>
<p>And there we have a solution for this minimum Island problem.</p>
<p>So we've seen this pattern a few times now, right or classic island hopping logic.</p>
<p>So when you think about islands are like connected components of a graph, this should be your first kind of go to algorithm.</p>
<p>Alright programmers.</p>
<p>So that wraps up our course on graphs.</p>
<p>I hope you learned a ton during the course.</p>
<p>I definitely had a blast making it Be sure to head to Shruti dotnet, where you can continue to practice more graph problems, as well as explore any other data structure algorithm topics.</p>
<p>I'll see you there. </p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Learn How to Solve Coding Interview Backtracking Problems ]]>
                </title>
                <description>
                    <![CDATA[ Backtracking is an algorithmic technique that is often used to solve complicated coding problems. It considers searching in every possible combination for solving a computational problem. Coding interview problems can sometimes be solved with backtra... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/solve-coding-interview-backtracking-problem/</link>
                <guid isPermaLink="false">66b2066fa8b92c93292364b3</guid>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ youtube ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Beau Carnes ]]>
                </dc:creator>
                <pubDate>Tue, 27 Jul 2021 17:18:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/07/backtracking.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Backtracking is an algorithmic technique that is often used to solve complicated coding problems. It considers searching in every possible combination for solving a computational problem. Coding interview problems can sometimes be solved with backtracking.</p>
<p>We released a full course on the freeCodeCamp.org YouTube channel that will teach you how to solve backtracking problems.</p>
<p>Lynn Zheng teaches this course. She is a software engineer at salesforce and an excellent teacher.</p>
<p>You will learn general principles and also learn to solve two LeetCode hard problems in this crash course.</p>
<p>Watch the full course below or on the <a target="_blank" href="https://youtu.be/A80YzvNwqXA">freeCodeCamp.org YouTube channel</a> (1-hour watch).</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/A80YzvNwqXA" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<h2 id="heading-transcript">Transcript</h2>
<p>(autogenerated)</p>
<p>Lynne is a software engineer at Salesforce and an excellent teacher.</p>
<p>In this course, you will teach you how to solve backtracking problems, which are common in coding interviews and challenges.</p>
<p>Hi, everyone.</p>
<p>I'm Leanne.</p>
<p>I'm a software engineer, hobbyist game developer and a recent graduate from the University of Chicago.</p>
<p>Welcome to this course on solving backtracking problems.</p>
<p>Whether you're new to coda interviews, or already have experience with backtracking problems, this is the crash course for you.</p>
<p>We will learn about an all purpose template that helps you solve any kind of backtracking problems, and we will apply the template to the ko problems, like the eight queens problem, or does Sudoku solver problem.</p>
<p>This is exactly the template that I use for my coding problems when I'm developing algorithms for my games, or even once in my research on a non convex optimization problem.</p>
<p>I hope you're excited and let's dive right into this versatile template.</p>
<p>You can find this template in my GitHub just links to in the video description below.</p>
<p>Let's start with some keywords and concepts in backtracking problems that will help us understand the template better.</p>
<p>The first keyword sticked.</p>
<p>Essentially, a backtracking problem is asking you to find a valid state.</p>
<p>Take the N queens example that we will solve later in this video.</p>
<p>An example of a state is just arbitrarily placing n queens on an n by n board.</p>
<p>For example, here we are placing four queens on a four by four board.</p>
<p>On the contrary, an example of a valid state requires that the queens are placed in a fashion that they cannot attack each other.</p>
<p>If you aren't familiar with the rules of chess, don't worry.</p>
<p>The myths of queens are pretty straightforward.</p>
<p>A Queen can move horizontally, vertically, or diagonally.</p>
<p>Therefore, for replacement of the N queens to be valid, they can't stand on the same row, the same column or the two diagonals.</p>
<p>So how do we construct a valid state like this? Well, we build up from previous states.</p>
<p>Suppose we're starting from a blank and by an board where no queen is present, we can put our first Queen arbitrarily, wherever we want.</p>
<p>Let's say we put it here.</p>
<p>Then where can we place a second query, you can see now our choices are limited.</p>
<p>Or in background terminology, our candidate states are limited.</p>
<p>Because we placed the first Queen here, this entire column, this entire row, and the two diagonals are not available for new queens.</p>
<p>Let's say we just put the second Queen here where it's available.</p>
<p>Next, we try to see where we can fit in the third queen.</p>
<p>Our candidates are now more limited because we put the second Queen here, this column, this row and this diagonal is not available.</p>
<p>So our third Queen can only go here.</p>
<p>Finally it let's place the fourth queen.</p>
<p>Because this third queen is here, it blocks this diagonal and this row and this column, leaving our fourth queen to set here.</p>
<p>Great.</p>
<p>Now is this global layout a valid solution such that no Queen can attack each other? Well, we've already seen in our checks.</p>
<p>So like this, we have found a valid solution to this end Queen problem.</p>
<p>As a counter example, consider if we placed the first two queens like this.</p>
<p>Now, all these cells marked in red are all available, and we only have one left for the third Queen and know where to place the fourth queen.</p>
<p>This means that the success of state searches fails to lead to a valid solution.</p>
<p>And this is pretty much it about states, identifying candidates to build the next state and validating a final solution.</p>
<p>Now let's look at how these procedures are defined in our template.</p>
<p>There are four functions in our template.</p>
<p>The first three, as well as state candidates, search our helper functions.</p>
<p>The last and most important one, so is the entry point to our program.</p>
<p>The sole function is indeed the one that a little problem is asking you to write.</p>
<p>It is responsible for returning the valid solutions.</p>
<p>Let's look at a helper functions one by one.</p>
<p>This valid state this function takes a state and returns a Boolean.</p>
<p>It validates whether a state can be used as a final solution in our queens problem State is a validated solution.</p>
<p>If all n queens are placed on a board, and none of them can attack each other, get candidates.</p>
<p>This function finds a list of candidates that can be used to construct the next state search.</p>
<p>This is a recursive function.</p>
<p>It caused the previous two helper functions and checks if the state is a valid solution to our backtracking problem.</p>
<p>If it is, it records the solution by making a deep copy of this state.</p>
<p>Note that we do need a deep copy self a shallow copy, because we will continue to modify the state as our search goes.</p>
<p>But we need a static snapshot of the valid state here.</p>
<p>This line of return is commented out, because depending on the nature of the problem, we might need to find all valid solutions or just one.</p>
<p>If we only need one, we can return as soon as we have find it.</p>
<p>Otherwise, we continue on until we exhaust all the possible search states.</p>
<p>Continue down here.</p>
<p>If the state isn't yet a valid solution, we find candidates to build the next state.</p>
<p>Recall that candidates return a list of candidates.</p>
<p>For each one, we add the candidate to the state.</p>
<p>In a quiz problem.</p>
<p>For instance, suppose our state only contains the position of the first queen.</p>
<p>Here we add a candidate position for the second point.</p>
<p>Now we'll take this modified state and recurse on it by calling the search method on this modified state.</p>
<p>If the modified state is valid, the solution is recorded.</p>
<p>Like here, otherwise, the search function fetches candidates for this modified state and recurse.</p>
<p>Further, eventually, for some state, there is no more possible candidate.</p>
<p>Think about the example where we cannot place a fourth going anywhere, because all the spaces have been occupied.</p>
<p>After returning from the recursive search, we restored a modified state to the original by removing the candidate from the state.</p>
<p>Again, the Queens example, we undo the placement of the second query.</p>
<p>And now we only have the first query as well.</p>
<p>So it starts with an empty list of solution and an empty state.</p>
<p>It costs search on a state and this list of empty solution.</p>
<p>Search will eventually fill up this list of empty solutions, and then return the list of solutions.</p>
<p>And remember, this is the function that the code problem is asking us to write.</p>
<p>We're using this template keeping might not this is only a template.</p>
<p>So your helper functions, as well as state get candidates, they might taking additional parameters.</p>
<p>Search might also return a Boolean indicating whether a solution has been found and returned early if there is one and only one valid global solution, like in a Sudoku problem that we will eventually see.</p>
<p>This concludes our brief introduction to the template.</p>
<p>Next, let's solve the Queens problem hands on in the code.</p>
<p>Here we are only code number 51 the N queens problem which is Alico heart problem.</p>
<p>Let's first read the problem statement, given an integer, and we want to return all the distinct solution to the n queens puzzle, and we may return to answer in any order.</p>
<p>And lico has a specific format for us to represent the board.</p>
<p>For four crease example, these are the two valid solutions.</p>
<p>And here with the notes, not the first square on the first row is not occupied, the second square is occupied by a queen, the third one is not occupied, the fourth one is not occupied.</p>
<p>And on the second row, the first three squares aren't occupied, and the last one is occupied by Queen, so on and so forth.</p>
<p>And in the case where n is one, the Queen can only be on a single grid.</p>
<p>So that's the solution.</p>
<p>Before jumping to the code, let's first think about how we may represent this problem.</p>
<p>Logically.</p>
<p>We might be tempted to represent this board data structure as a 2d array, but it's actually a little bit waste of space do so.</p>
<p>Since no queens can be on the same row or the same column, we may just keep a one day list that tracks the Queen's position in each row.</p>
<p>Concretely, for this example here on the left, well the first row, the queen is in the second cell, so the first index is one.</p>
<p>For the second row, the index is three, since the queen is in the fourth cell, and this here is zero.</p>
<p>This here is two, following the same logic.</p>
<p>For the example on the right, the first index is two, the second index is zero, the third one is three, and the last one, one, because the third cell, the first cell, the fourth cell, and the second cell.</p>
<p>So this is the way that we represent each state as a 1d list.</p>
<p>For this backtracking problem.</p>
<p>Now I'm going to grab my template and put it into the code.</p>
<p>I'm going to move the surf method on top.</p>
<p>As already mentioned, the surf method is basically the one that the code is asking us to write.</p>
<p>So for the soap and Queens problem, we'll just be adapting the soap function to solutions is initially an empty list, because we may return all the valid solution in any order, then my starting state is just an empty list because we haven't placed any of the Queens into the board just yet.</p>
<p>Now we call self dot search on this date, given it all a list of solutions to append to and the parameter n for the N queens.</p>
<p>After the search is complete, we return to solutions.</p>
<p>Let's go ahead and remove this part.</p>
<p>Great.</p>
<p>Now we will write that as well as state function, it will take as parameter self, state and add for state to be valid, it needs to put all n queens onto the board.</p>
<p>So if the length of the state is n, then we know we have already put all n queens onto the board.</p>
<p>As for the condition where no queens can attack each other, we will handle it in the get candidate function.</p>
<p>Essentially, we will only return candidates that meant all valid scores that won't be attracted by the previously placed queens self state.</p>
<p>Great.</p>
<p>So here we are constructing candidates based on the state that were given.</p>
<p>If there's no state, meaning that we're starting from a blank board, we may place the first query anywhere we want.</p>
<p>So if not state, we return all the possible indices.</p>
<p>If the state is not empty, we find the next position in this state to populate position as the length of the state.</p>
<p>If we already placed the first Queen, we want to place the second query.</p>
<p>So candidates initially start from all the indices and then we prompt down candidates that aren't valid.</p>
<p>I'm using a set because it's better than walking through a list and set guarantees uniqueness.</p>
<p>Alright, prone down candidates that place the Queen into attacks.</p>
<p>So for row column enumerate state with discard the discard of column index if it's occupied so candidates that this part recall that our state is recording the column index for each row.</p>
<p>Now we discuss the diagonals.</p>
<p>So this test is the distance between the position and a row index.</p>
<p>Because we're trying to put a queen in the second row, now that we have already filled in the first row, we want it in the place that cannot be attacked by the first Queen diagonally.</p>
<p>So this one is out of the question.</p>
<p>And this is column plus distance.</p>
<p>This one is also out of the question and column minus distance.</p>
<p>And at the very end, we return candidates.</p>
<p>Now let's define our recursive search function is your take states solution solutions, and we just adapt the template.</p>
<p>So if self.is valid state state, and we just add it to the solutions, and return.</p>
<p>Otherwise, if we come down here, for candidates, a salt candidates state, and we recurse.</p>
<p>Because our state is in list and no longer is set, we do append candidate, and then call self dot search, state solutions, and it and then to restore the modified state back to our original repop the last entry.</p>
<p>Great.</p>
<p>So this here is the only thing that we need to take care of, because lico wants us to output strings.</p>
<p>And here we have is a list of column indices.</p>
<p>So let's define some additional helper functions here.</p>
<p>State to string state, we expect the output to be just like here.</p>
<p>So here's how we convert our list of indices.</p>
<p>To this output stray specified lightly code, total return is just a list for I am state because one means that the queen is in the second cell and the other cells are empty, we just append the strings for the empty cells as well as a string for the Queen's code cat knows together to get the return value.</p>
<p>string is this dot meaning the empty square times i plus the Queen's position was the remaining empty cells.</p>
<p>And rats straight.</p>
<p>were returned direct.</p>
<p>And here is self solution at Penn State copy.</p>
<p>We do state string and string is produced by self dot script to string sticked.</p>
<p>Great.</p>
<p>Let's now run the example code to see how we did.</p>
<p>Alright, cool.</p>
<p>Looks like our output is accepted.</p>
<p>Let's submit and see whether we can pass all the test cases Great, you can see that our runtime is better than almost 70% of the submissions and also some memory usage is better than 7% of the other submissions.</p>
<p>We are definitely using some memory because of the recursion, but that's totally okay for backtracking problems.</p>
<p>Next, we'll solve another lico heart problem called the Sudoku solver problem.</p>
<p>We're now only co problem 37 the Sudoku solver problem, which is a hard problem.</p>
<p>If you don't already know what a Sudoku puzzle is, you can read the description.</p>
<p>So a Sudoku solution must satisfy all the following rules.</p>
<p>Each of the digits one to nine must occur exactly once in each row.</p>
<p>And each column.</p>
<p>Also a nine of the three by three sub boxes of the grid, and liko use the dot character to indicate empty cells.</p>
<p>So for example, here, the code wants us to write a program that fills out this Sudoku puzzle.</p>
<p>In a valid way, the board is represented as a 2d array of strings, some maybe numbers, some empty cells, and lico wants us to solve the problem and modify the board in place.</p>
<p>The constraints are not because it's a Sudoku problem, the shape is nine by nine.</p>
<p>And each cell is either a digit string or the empty string.</p>
<p>And it's guaranteed that the input board has only one solution.</p>
<p>So we may return early.</p>
<p>If we find only one solution.</p>
<p>Let me copy paste my template and jump into the problem.</p>
<p>Alright, so again, we adopt the soak function like this, because it asked us not to return anything and just modify the port in place, I think we'll just need to do socket search board.</p>
<p>And then we get rid of this little function.</p>
<p>I'm going to have to define some constants here.</p>
<p>So the shape is nine by nine.</p>
<p>Grid length is three by three, if we're trying to validate the sub boxes, and empty is represented as this dot here.</p>
<p>And all the digit strings are like false.</p>
<p>So screen number four number in range.</p>
<p>One shape, plus one.</p>
<p>So this gives us the strain from one to nine.</p>
<p>And I'm going to wrap it in a set, because the order is not important.</p>
<p>And I know I'm going to need this when I'm traversing the Great.</p>
<p>Great.</p>
<p>So let's start by writing that is valid state function.</p>
<p>So it should take self and the board and check if the board is a valid solution.</p>
<p>So let's validate all the rows first.</p>
<p>For row a, I'm going to just define some helper function later down.</p>
<p>So let's do first soft get rows, which returns each row of the board one by one.</p>
<p>If, if my row is equivalent to all the digits, that it's a valid row.</p>
<p>Otherwise it's an invalid row and tire board is not valid.</p>
<p>If not set row is equal to soft digit.</p>
<p>return false validate.</p>
<p>Similarly we validate the columns calls return false.</p>
<p>Or Lastly, we'll validate the sub boxes.</p>
<p>For grid, grid, or.</p>
<p>And if all the rows are validated, all the columns are validated and all the grids are validated without causing this false return already, we return true meaning that the board is not a valid solution.</p>
<p>Now let's write to get candidates.</p>
<p>So self board a row and the column I'm using a row and the column because for a cell, I want to know which row and which column it is all to determine what digits have already be used, and what are left for us to use as a next state.</p>
<p>So used digits is a set of digit.</p>
<p>And I'm going to remove used remove digits used by the same row.</p>
<p>So used digits dot update self dot get row, this is another helper function that I will define later down digits used by that same column.</p>
<p>So used update self dot get column four, and the column removed digits used by the same by that by the three by three sub box budgets, update get graded roll column.</p>
<p>So we need to identify for an arbitrary sell which grid is on board roll call.</p>
<p>And lastly, because we might have already used empty string, here, when we are doing the updates, we subtract those from our use digits.</p>
<p>Empty is the constant that were defined for the empty string.</p>
<p>And candidates are just whatever that's left for us to use.</p>
<p>So that all useless and that concludes our get candidates function.</p>
<p>Now, we are moving on to do search.</p>
<p>Because we only have one single solution, we don't need it the list of solutions here.</p>
<p>So, so forth.</p>
<p>We have Isabel at stage.</p>
<p>So if self.is valid state board we return true solution.</p>
<p>Otherwise, we find the next empty spot and take a guess.</p>
<p>So for row index row enumerate or four column index, the actual element enumerate row.</p>
<p>If the element is the empty string, so soft, that empty for if this is empty, find can dates to construct an X ray.</p>
<p>Next fate candidate a self dot get candidates board.</p>
<p>Now that we have the row index and column index, we pass those a, we modify the board in place as the problem instructed us to do.</p>
<p>So.</p>
<p>candidate, remember that candidate is just one of the digit string.</p>
<p>And because here our search returns a Boolean, if one of the search actually finishes, that means that the board has been modified in place, and our problem is solved.</p>
<p>So it's solved is now equal to self dot search.</p>
<p>And just to add some comments here, we recurse on the MADI side.</p>
<p>If so, if so, now we just return to meaning that the entire search has completed.</p>
<p>Otherwise, we all do the wrong guess.</p>
<p>And start anew.</p>
<p>So we make this entry back into the empty screen that it was.</p>
<p>And down here we have exhausted all the candidates.</p>
<p>But no solves the problem.</p>
<p>We return false because this is an invalid succession of searches.</p>
<p>And if no empty spot in the first place that will just return.</p>
<p>Now we can get rid of this boilerplate code from our template.</p>
<p>Now the structure is pretty much clear.</p>
<p>And all I need to do is to fill a those helper functions.</p>
<p>helper functions for retrieving rows, columns and groups.</p>
<p>So here are my helper functions for retrieving rows, columns and grids.</p>
<p>This is pretty straightforward because our board is just a 2d array.</p>
<p>And to retrieve the cape row, column, or grid at our center row and column indices, we are basically just doing some really smart indices and sometimes relying on the power of either tools.</p>
<p>I will post my complete code on my GitHub link to in the description so you can digest those helper functions on your own.</p>
<p>Now let's run the code and see what we get.</p>
<p>Great, our output is accepted that submit and test it against all the test cases.</p>
<p>Awesome.</p>
<p>With this template, we still to lico hard problems.</p>
<p>To recap a backtracking problem is all about finding valid states.</p>
<p>To so far valid state, we identify candidates that satisfy the problem constraint and use them to build upon our current state.</p>
<p>Once a modified state is valid, we added as a final solution.</p>
<p>Now that we have sub two problems hands off, let's take another look at our template.</p>
<p>Recall that we have these four functions, as well as state is a helper function with a Boolean return value that validates whether a given state is final solution.</p>
<p>Get candidates is another helper function returning a list of candidates satisfying the problem constraint based on our current state.</p>
<p>Search is a recursive function or cost the two helper functions as well as state and get candidates and recurse on itself.</p>
<p>Lastly, solve is the function another lico problem is asking you to write it does nothing fancy other than initializing an empty list of solutions.</p>
<p>And then to state and colleagues search on them.</p>
<p>For more practice problems on backtracking, go to leak co.com and intacs search for backtracking.</p>
<p>This filters out a list of questions that all shares a backtracking idea.</p>
<p>You see, we already solved Sudoku solver, and n queens.</p>
<p>If you're looking for a medium hard problem, I recommend the subsets problem.</p>
<p>This is about finding all possible subsets or power sets often given an integer array.</p>
<p>It is pretty easy to identify a backtracking problem when we are asked to find all possible solutions and may return a solution in any order.</p>
<p>As you can see, in my submission details, I soaked the subsets problem using the exact template.</p>
<p>As you go through more and more legal problems, and test how much you understand about the template, you will be better prepared to identify a backtracking problem once you encounter one in your coding interviews.</p>
<p>This concludes our video and the only Crash Course you ever need for solving backtracking problems on your coding interviews.</p>
<p>For more content like this, please subscribe to my YouTube channel links down below.</p>
<p>I also post form project tutorials at my game development demos on my channel.</p>
<p>My latest tutorial is about building a discord AI chat bot with the personality of your favorite character using entirely cloud based technologies and I'm sure you will enjoy it.</p>
<p>Thanks for watching and best of luck preparing for coding interviews. </p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Ace Your Coding Interview – Advice from a Senior Software Engineer ]]>
                </title>
                <description>
                    <![CDATA[ By Daniel Chae Technical interviews are one of the most stressful parts of landing a job in tech.  You don't know what questions the interviewer is going to ask. What if you have no idea how to solve the problem in front of you? What if you freeze up... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-acing-your-coding-interview-advice-from-senior-software-engineer/</link>
                <guid isPermaLink="false">66d45e04aad1510d0766b5f9</guid>
                
                    <category>
                        <![CDATA[ coding interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview questions ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Interview tips ]]>
                    </category>
                
                    <category>
                        <![CDATA[ self-improvement  ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 10 May 2021 17:04:31 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/05/kaleidico-3V8xo5Gbusk-unsplash--2-.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Daniel Chae</p>
<p>Technical interviews are one of the most stressful parts of landing a job in tech. </p>
<p>You don't know what questions the interviewer is going to ask. What if you have no idea how to solve the problem in front of you? What if you freeze up and look like you don't know what you're doing?</p>
<p>Many aspiring programmers work themselves up into a frenzy as they try to memorize every coding interview question. You and I both know this approach is unsustainable. I'm here to tell you there's an easier way. </p>
<p>I recently sat down with my friend Michelle, who's a senior software engineer at Stitch Fix (a recently IPO'd company). She shared the kinds of qualities she looks for in developers that she interviews. </p>
<p>Honestly, the qualities might surprise you. I promise they don't include memorizing coding interview questions and solutions.</p>
<p>The rest of this article will unpack the qualities Michelle looks for in developer candidates. I'll translate each of these qualities into key interview behaviors. Then I'll tell you how you can implement them in your own interviews. Let's get started.</p>
<h2 id="heading-qualities-you-should-have-going-into-the-coding-interview">Qualities you should have going into the coding interview</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/rachel-mcdermott-0fN7Fxv1eWA-unsplash.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>When I sat down with Michelle, a part of me imagined I was getting a secret code to cracking the coding interview. I thought I'd hear the ultimate algorithm to solving every problem out there. </p>
<p>While we know a universal algorithm doesn't exist, she did share something even better: how to create a mental a framework for interviewing.</p>
<p>Success is not about memorizing every problem and solution. Rather, it's about learning how to solve problems. </p>
<p>As a developer, there won't be a cookie-cutter LeetCode type of answer. This is where mental frameworks are incredibly helpful. They create just enough problem solving certainty to overcome a seemingly ambiguous problem. </p>
<p>Here are Michelle's key components to building a killer mindset framework for your coding interview.</p>
<h2 id="heading-be-curious">Be curious</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/ayo-ogunseinde-sibVwORYqs0-unsplash.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>One of Michelle's biggest tips for developer candidates is to be curious. Clarify the problem and ask questions. Share any thoughts you have on the problem you're facing. Interviewers aren't just looking for the right solution. They want to see how you think. </p>
<p>The best way you can show how you think is by asking questions. Let's say an interviewer asks you to check if a string contains any digits. You should clarify the question in your own words, something like:</p>
<p>"So I need to find a way to verify if a set of characters contains any numbers?"</p>
<p>When you say this you're giving interviewers insight into your logic. You're also showing them you're interested in the problem. </p>
<p>And don't be afraid to ask follow-up questions. Using the same example above, here are a few questions you can ask:</p>
<p>"Do the numbers I'm looking for contain decimals?"</p>
<p>"Do I need to sort the characters in any way before checking them?" </p>
<h2 id="heading-be-open-to-suggestions">Be open to suggestions</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/christina-wocintechchat-com-IxmHiUC-yOw-unsplash.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>One thing that is easy to forget is that interviewers want you to succeed. Most interviewers want to provide real-time feedback and suggestions to candidates. But candidates often take a non-verbal, siloed approach to the coding interview. </p>
<p>One way you can be more open to suggestions is by engaging your interviewer. Verbalize your logic and take them along your problem solving journey. </p>
<p>We'll use the same problem as above. Here are a few ways you can verbalize your logic from the get-go:</p>
<p>"So I'll need to establish a way to separate characters from numbers, right?"</p>
<p>"I'm thinking about iterating through the set of characters from end to end."</p>
<p>"I want a programmatic way to iterate through characters, but stop at numbers."</p>
<p>The more insight you can provide, the more your interviewer will feel inclined to help. </p>
<h2 id="heading-work-collaboratively">Work collaboratively</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/airfocus-v89zhr0iBFY-unsplash.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This goes hand in hand with the above. The idea that a developer works siloed and alone is a myth. You have version control and project management tools that require collaboration. </p>
<p>You should verbalize your approach, ask great questions, and loop your interviewer in. You'll arrive at the solution much more quickly. But you'll also show your interviewer you can effectively collaborate with other developers. </p>
<p>Here are a few ways you can loop your interviewer in:</p>
<p>"Would a for loop be too simple/complex for this solution?"</p>
<p>"How important is it to establish if there are floats or not?"</p>
<p>"Is there any type of solution you have in mind?"</p>
<h2 id="heading-be-willing-to-just-go-for-it">Be willing to just go for it</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/dayne-topkin-XQWtAFOO7zc-unsplash.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Finally, Michelle suggested that developer candidates should just go for it. Meaning, go for the success you want to see. </p>
<p>One of the most common occurrences for candidates is that they freeze up. While this is understandable, no one wins in this situation. You can't show how incredible you are and the interviewer can't help you. Here's what Michelle said to "just go for it":</p>
<blockquote>
<p>Even if you have to pseudocode your implementation, that’s better than being too nervous to try. Putting something on the board/coderpad will invite discussion, a chance to share your thoughts, and an opportunity to learn.   </p>
<p>Don’t be afraid to fail! It just means you’re one step closer to succeeding. :)</p>
</blockquote>
<p>"Just go for it" can mean a lot of things. That said, here are a few examples of what that can look like:</p>
<ul>
<li>Write pseudocode on the whiteboard, paper, or coderpad</li>
<li>Note exactly where you are stuck in your logic</li>
<li>Verbalize the solution you wish you could come up with</li>
</ul>
<h2 id="heading-use-the-mindset-framework-to-ace-your-coding-interview">Use the Mindset Framework to Ace Your Coding Interview!</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/denys-nevozhai-z0nVqfrOqWA-unsplash.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Coding interviews can be scary and there's always the fear that you'll freeze up. Part of this fear stems from not knowing which questions will show up. </p>
<p>The great thing is that you no longer have to memorize coding questions and solutions. Instead, build a mindset framework with the key interview behaviors you read about today. </p>
<p>You want to be curious and open to suggestions. You should work in collaboration with your interviewer. Be willing to go for the success you want to see. Happy interviewing! </p>
<p>If you want to see more of this type of content, subscribe to my newsletter at <a target="_blank" href="https://coursetohire.com/">Course to Hire</a>. I'll help you learn how to code and break into tech. Feel free to add me on <a target="_blank" href="https://www.linkedin.com/in/daniel-chae11/">LinkedIn</a> as well.</p>
<p>P.S. – if you're interested in connecting with Michelle, ping me on Course to Hire or LinkedIn and I can make the intro.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Why Your Resume Is Being Rejected - and How to Fix It ]]>
                </title>
                <description>
                    <![CDATA[ By Zhia Chong If you are a new grad looking for an internship or full-time position at a top-tier tech company, this article is for you. If you know someone who’s currently in the process of looking for a new developer job, send them this article. I ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/why-your-resume-is-being-rejected/</link>
                <guid isPermaLink="false">66d461d6bd438296f45cd3e4</guid>
                
                    <category>
                        <![CDATA[ coding interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Interviewing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ resume ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 21 Feb 2020 08:02:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/02/Screen-Shot-2020-02-17-at-9.19.27-PM-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Zhia Chong</p>
<p>If you are a new grad looking for an internship or full-time position at a top-tier tech company, this article is for you.</p>
<p>If you know someone who’s currently in the process of looking for a new developer job, send them this article.</p>
<p>I summarize some of the top mistakes I see as a career coach, and as someone who’s been on both sides of the metaphorical interviewing “table”.</p>
<p>These tips have helped me land job offers from <a target="_blank" href="https://www.freecodecamp.org/news/how-i-landed-offers-from-microsoft-amazon-and-twitter-without-an-ivy-league-degree/">Microsoft, Amazon, and Twitter – all without an Ivy League degree</a>.</p>
<p>Avoiding these mistakes is critical because, if you are making any of these mistakes today, chances are your resume is not getting picked up by the right people. </p>
<p>Even worse, you’re <strong>not getting the opportunity that you deserve</strong>.</p>
<p>If you prefer to watch this article instead, I made a whole video about it here:</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/7l4WyLzj0V4" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<h2 id="heading-mistake-1-too-much-fluff-not-enough-stuff">Mistake 1: Too much fluff, not enough stuff</h2>
<p>Many first-time candidates spend too much time on their resume!</p>
<p>What I mean specifically is that they focus mainly on the formatting, the color, the fonts, and the layout of the resume.</p>
<p>They’re so focused on the formatting of the resume that they can’t see the forest for the trees. They don’t realize that their resume lacks the right content for the jobs they want.</p>
<p>Why’s that important, you ask? In today’s market, trying to be a software engineer is a highly competitive industry. There were 26 million developers by the end of 2019, and we're expecting to have 27.7 million developers by 2023, according to this <a target="_blank" href="https://www.daxx.com/blog/development-trends/number-software-developers-world">article</a>.</p>
<p>And it makes sense why many people covet jobs in the software engineering industry: they often boast a  <a target="_blank" href="https://www.youtube.com/watch?v=ALgI6OY5W2A&amp;t=110s">high 6-figure salary</a>, amazing health benefits, unlimited PTO, free snacks and food, among other perks.</p>
<p>In a competitive, red-hot market, the thing you need to do to stand out is to focus on the actual content of your resume. What that means specifically is to pick up “meaty” or interesting projects that will hone your technical chops and beef up your portfolio. </p>
<p>Here’s <a target="_blank" href="https://www.freecodecamp.org/news/how-i-built-a-web-crawler-to-automate-my-job-search-f825fb5af718/">an example</a> of a web crawler that I built to help me apply to companies and also beef up my resume.</p>
<p>Strong technical skills/experience makes you a much stronger and attractive candidate. Many fresh grads try to pad up their resume with non-tech related experience like social clubs. </p>
<p>I don’t think those are unnecessary. Non-tech related experiences are valuable insights into your character. But if you’re trying to apply as a software engineer, what’s most important here is the technical content. </p>
<p>Companies want to see your technical skills, whether you can write code, and if you can deliver a given assignment and get stuff done.</p>
<h2 id="heading-mistake-2-tutorial-hogs">Mistake 2: Tutorial Hogs</h2>
<p>The second most common mistake I see is that many people spend too much time on tutorials with no clear goals in mind. </p>
<p>They’re the typical Coursera/EdX/ warriors who sign up for every Android, Swift, JavaScript, React course available and work through them diligently.</p>
<p>They know every syntax of every programming language out there. They can chat religiously about MVC vs MVVC. They know what’s “in” and what’s “out”.</p>
<p>But the truth is usually not so rosy — about a few weeks into one course, they <em>give up</em>.</p>
<p>They have learned the syntax of the language and how to set up the framework. But they haven’t actually built anything substantial using the knowledge that they have gained.</p>
<p>Now that is a problem because what happens is that you have a lot of “fringe” knowledge (things that few people know a lot about). But you are not able to take that knowledge and apply it.</p>
<p>In the industry there’s something that we call “applied intelligence.” Can you apply your knowledge to a new domain? Can you take your knowledge about Python, for example, and use that to automate your finances via a Python script?</p>
<p>If you can do so, then you’re presenting yourself as a holistic, technical-oriented problem solver. And that’s what a lot of companies are looking for.</p>
<h2 id="heading-mistake-3-missing-the-forest-for-the-trees">Mistake 3: Missing the forest for the trees</h2>
<p>Why limit your job search to only San Francisco or Seattle? Or even the US for that matter?</p>
<p>Most people make the mistake of applying only to the companies that they’ve heard of, like Google, Facebook, or Twitter.</p>
<p>But the problem is this: there <em>are only a handful of top companies in the industry with even fewer job opportunities</em>.</p>
<p>The truth is you have a very limited set of openings, with a lot of competition from the large pool of applicants all over the world. The chances of getting an interview or even landing a job become extremely thin for the average person.</p>
<p>My recommendation is to <strong>expand your horizons and search beyond just the companies you’ve heard of.</strong></p>
<p>Instead of just focusing on those top tech companies, open up your eyes and look across startups, midsize companies, and non-tech companies because those are the best opportunities right now.</p>
<p>Starting somewhere small and building your experience along the way is a great way to bootstrap your career. It doesn’t really matter how much you get paid initially or what the title of the position really is, because once you get your foot in the door, you can learn and improve yourself to prepare for the job you <em>want</em>. </p>
<p>That’s exactly what I did when I graduated from college — I didn’t have any job lined up. I then wrote a script that helped me apply to different companies, and finally a startup took a gamble on me and gave me a job. You can read more about my story <a target="_blank" href="https://www.freecodecamp.org/news/how-i-landed-offers-from-microsoft-amazon-and-twitter-without-an-ivy-league-degree/">here</a>, and how I finally landed at Twitter.</p>
<h2 id="heading-mistake-4-right-credentials-wrong-job">Mistake 4: Right Credentials, Wrong Job</h2>
<p>My best analogy for this: would you buy a shovel to build a door? Most likely no, so why would you apply as a machine learning specialist if you are a front-end engineer?</p>
<p>This baffles me as I’ve seen many great resumes come through the door for the wrong positions. Most of my friends have seen this happen as well. And the unfortunate truth is that, <strong>most companies will throw your resume in the trash if it’s not the right fit.</strong></p>
<p>Some of my friends shyly confided in me that they’re hoping that the HR department would slot their resume in the right hands somehow.</p>
<p>I’m sorry, but they won’t.</p>
<p>If you’re a software engineer and you’re trying to apply for a machine-learning positioned, ideally your resume should have some relevant experience related to machine learning. Either you should have taken some internship projects or have some machine learning related experience at your current job. </p>
<p>My personal recommendation in this case is to:</p>
<ol>
<li>Figure out what skill sets you have and how your skill sets match up with the position</li>
<li>Get a friend to review your resume with you and see where the gaps are</li>
</ol>
<p>If you don’t have a friend (sad but OK), then ping me <a target="_blank" href="https://zhiachong.com/">here</a> — I can’t promise I’ll find you a friend, but I can help review your resume.</p>
<h2 id="heading-keep-refining-your-resume-and-keep-applying">Keep refining your résumé. And keep applying.</h2>
<p>If you found this article useful, join my newsletter where I write monthly about software engineering, technical interviews, and technologies <a target="_blank" href="https://twitter.us12.list-manage.com/subscribe/post?u=262c24df721ffeaf01457ee4d&amp;id=8344d30ec7">here</a>. Follow me on <a target="_blank" href="https://twitter.com/zhiachong">Twitter</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ From High School Dropout to Managing 25 Employees: The Hardest Decade of My Life ]]>
                </title>
                <description>
                    <![CDATA[ I'm a pretty private person. But over the past 5 years people have asked me a lot of personal questions. They've even created an entire category about me on Quora. I've answered most of these questions over the years. But there's an entire period of ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/software-engineering-daily-quincy-larson-freecodecamp-interview/</link>
                <guid isPermaLink="false">66b8d57bf8e5d39507c4c110</guid>
                
                    <category>
                        <![CDATA[ freeCodeCamp.org ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ nonprofit ]]>
                    </category>
                
                    <category>
                        <![CDATA[ podcast ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Quincy Larson ]]>
                </dc:creator>
                <pubDate>Mon, 23 Dec 2019 18:44:45 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9e83740569d1a4ca3d80.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>I'm a pretty private person. But over the past 5 years people have asked me a lot of personal questions. They've even created an entire category about me on Quora.</p>
<p>I've answered most of these questions over the years. But there's an entire period of my life that I've never talked about before.</p>
<p>Mostly because I don't want any kids reading this to think: "I should drop out of school" or "I should run away from home and live on the streets." Please don't do these things.</p>
<p>The reason I'm sharing this now is to show you that I have made mistakes.</p>
<p>You don't have to let anger or nihilism consume you, like I almost did. While there is still life, there is still potential.</p>
<p>So, yes – I dropped out of high school.</p>
<p>Yes – things got so bad I spent a year sleeping in my car, in Walmart parking lots around Oklahoma City.</p>
<p>Yes – I managed to turn my life around – getting a GED while working at Taco Bell, and getting a degree from a commuter school.</p>
<p>Yes –  I ultimately worked as a reporter, moved to China for several years, and became a school director, managing 25 employees.</p>
<p>And yes – all of this happened within the same decade.</p>
<p>The longest, hardest decade of my life.</p>
<p>Software Engineering Daily host Jeff Meyerson interviewed me at length about my past. In our 2-hour conversation, we explored the years leading up to me learning to code and building the first version of freeCodeCamp.</p>
<p>I've embedded the podcast below, along with the entire transcript. But first, here's the part where I describe this period of my life.</p>
<h2 id="heading-punctuated-equilibrium">Punctuated Equilibrium</h2>
<p>I think every kid growing up in Oklahoma City in the 1990s can relate to how devastating the terrorist attack was. Not just for the families of all the people who died, but for everyone who felt the rumble of the explosion as it tore through the city.</p>
<p>For me, it was an end of innocence.</p>
<p>Here's how I described the event during Jeff's interview:</p>
<blockquote>
<p><em>The day my childhood ended was April 19th, 1995. I was in Oklahoma City, 9:02 AM. I was in my science class and suddenly all the beakers started rattling and all the tables started rattling. And I'd never been in an earthquake before, but we just assumed it was an earthquake.</em></p>
<p><em>All the students, the teacher, everybody looked around and looked at one another. We saw the room shaking and we didn't know what happened. A few minutes later we found out what had happened.</em></p>
<p><em>There was building in downtown Oklahoma City and a terrorist had parked a truck in front of it filled with fertilizer. And he detonated it and killed 168 people, including 19 little babies that were in a nursery on the ground floor.</em></p>
<p><em>So that for me was a huge jolt. I went from just being what I would describe as a pretty typical middle-class kid in middle America - to starting the question reality, and how we got to this point where something like this wasn't stopped.</em></p>
<p><em>Then watching the ensuing chaos, watching how people around me reacted. I had a classmate who lost her dad. That experience really woke me up. From then on, I couldn't really look at reality the same way.</em></p>
</blockquote>
<p>My grades and my family situation at home quickly deteriorated.</p>
<p>After years of unhappiness, I made a series of dramatic decisions.</p>
<blockquote>
<p>My dad was a strict disciplinarian, and we would always fight. One day when I was a sophomore in high school, I got sick of fighting with him. My grandma had just died and I had inherited her 1986 white Ford Taurus sedan. I grabbed all my stuff and threw it in the car and I just drove off.</p>
<p>I spent the next year of my life just living in my car. Staying in Walmart parking lots overnight where there was light.</p>
<p>At first, I kept going to high school. But one day I was in the cafeteria and I saw a man from my church who had been a huge inspiration to me. He always volunteered to lead Sunday school, and I was really good friends with his kid.</p>
<p>He had a college degree and he’d worked for decades. But I saw him in the cafeteria with a hairnet on, serving food. And he had been reduced to doing that to be able to provide for his family.</p>
<p>And at that moment, I just – within that instant, I just kind of became disillusioned with school and I just decided to drop out.</p>
<p>So I was living in my car, and I just started going to the library every day where it was warm and just rotating through all the different libraries around Oklahoma City. Reading books and just thinking a lot. Then pulling up in the Walmart parking lot and going to sleep.</p>
</blockquote>
<p>Life as a high school dropout living in my car was hard. The gravity of the situation hit me fast.</p>
<p>My savings from those summers of mowing lawns evaporated. I had no useful skills. I had burned most of my bridges.</p>
<p>I could no longer ignore my problems and try to live inside books or inside my own head.</p>
<p>I needed to figure out how to make ends meet so I could survive.</p>
<blockquote>
<p>Eventually I needed money to buy food and stuff. So I got a job at Taco Bell. My manager was this burly guy named Duke who had a very prominent Confederate flag tattoo on his arm that his uniform didn’t cover.</p>
<p>Whenever business was slow, I'd just run to the backroom, I’d build a burrito real quick and eat it. And I'd just kind of contemplate my life and where things were going and what I was going to do. I really had no idea, but I decided that I probably did need to probably go to school if I didn't want to end up like Duke here.</p>
<p>So I took the GED and I enrolled in the cheapest state university I could. And I traded my Taco Bell job for working at different newspapers around town while I was studying liberal arts.</p>
<p>I would just run around with my steno pad and interview people in different positions of power. There were a bunch of rich homeschoolers around the city and I would just go over and teach them. So that was my first experience with teaching.</p>
</blockquote>
<p>Those first few years of working as a reporter helped me ask better questions, and better understand how the world worked. </p>
<p>The dean of the Liberal Arts department took me under his wing. He told me about his invite-only weekly seminar with international students from around the world.</p>
<p>Learning about life in other countries - straight from the people themselves - really opened my eyes.</p>
<p>The world was so much bigger than Oklahoma City.</p>
<blockquote>
<p>By the time I graduated, I already knew where the big change was happening. It was the early 2000's and there was only one destination that an ambitious person would seek out, and that was China.</p>
<p><em>China was undergoing a historic state of hyper growth where 300 million plus people were going from subsistence farming to middle-class service sector-type jobs. I wanted to understand that.</em></p>
<p><em>So I found an international graduate program where I could go and study with a bunch of Chinese. I got on a plane and I flew to Tianjin.</em></p>
<p><em>I didn't know anybody there. I was the only westerner on a campus of 20,000 people. I had a bunch of Korean international trade students who shared a room with me, and I set to work learning Chinese and learning as much as I could about China."</em></p>
</blockquote>
<p>After 4 years of studying and working as a teacher in China, my wife - a classmate of mine - got her US visa. We moved back to Oklahoma City.</p>
<blockquote>
<p>I was 26. I was the youngest school director in the school system, and I was just learning about how to run a school and how to...</p>
<p><strong>Jeff:</strong> How do you get there? How do you get that job? How do you get the job as the youngest school director in a school system?</p>
<p><strong>Me:</strong> Well, when I immediately came back from China, I worked at a convenience store and I was trying to find any job I could that was focused on an international education. </p>
<p>I found this one school that was an intensive English program on a university campus, and I just did everything within my power to get that job. I learned everything I could about the people who worked there. I learned everything I could about the history of the organization, and I just went in there like a walking, talking encyclopedia, and against all odds, I managed to get that job</p>
<p>I remember I interviewed for like six hours on three different occasions, because the director was – she was skeptical that I would be able to do it, because I didn't have any real managerial experience.</p>
<p>The teaching experience I did have was mostly teaching homeschoolers and teaching engineers from Brazil in China. I would teach them how to use English, because there were just huge swaths of people moving to China to be able to participate in the big economic boom that China was experiencing.</p>
<p>So I was teaching all these expats how to speak English and I was teaching Chinese how to speaking English, and so my teaching experience was fairly limited. I didn't have a master’s degree in education or in teaching English as a second language or anything like that. So I really just had to offset all that by just interviewing extremely well and being extremely knowledgeable. </p>
<p>So this is where I learned how to manage people. I was not only managing teachers - I was also managing other administrators. I was managing home stays. Basically, people who open up their homes to welcome students from abroad.</p>
<p>We had a lot of students from China, Japan, from Korea, from Saudi Arabia, from Brazil, and from Europe, and I had to work directly with those parents and iron out a lot of the problems. I had to work with agencies who wanted to place students in the U.S. I had to work with the U.S. government and the immigration department and just do an incredible amount of paperwork and basically keep this school running.</p>
<p>I went from managing zero people to managing 25 people overnight when I get this job.</p>
</blockquote>
<p>It was a crazy decade. And what I've shared with you here is just a few minutes of the podcast interview. Jeff and I talked about a lot of other things, too. Including where freeCodeCamp is heading in 2020.</p>
<p>You can listen to the full interview here (140 minute listen):</p>
<div class="embed-wrapper"><iframe src="https://www.listennotes.com/embedded/e/73d191dceeac428e8bbb0f997a8100d1/" height="300px" width="100%" style="width:1px;min-width:100%" title="Embedded content" loading="lazy"></iframe></div>

<p>Or you can <a target="_blank" href="https://softwareengineeringdaily.com/2019/12/20/freecodecamp-with-quincy-larson/">hear it on Software Engineering Daily's website</a> (with options to open it in various podcast players).</p>
<p>I want to thank Jeff for inviting me back onto his podcast, and for his thoughtful questions. At this point, he's interviewed nearly 1,000 developers on his show. I strongly encourage you to subscribe.</p>
<h2 id="heading-here-is-the-full-transcript-of-the-interview">Here is the full transcript of the interview.</h2>
<p><strong>Jeff:</strong> freeCodeCamp was started five years ago with the goal of providing free coding education to anyone on the internet. freeCodeCamp has become the best place to begin learning how to write software.</p>
<p>There are many other places that a software engineer should visit on their educational journey, but freeCodeCamp is the best place to start, because it is free and there are no advertisements.</p>
<p>For most people learning to code, the price of that education is very important, because they’re learning to code to build a new career. Many people are learning to code because they don't have any money.</p>
<p>It's also important that a new programmer learns from an unbiased source of information, because an ad-supported environment will educate the new programmer towards products that they might not need.</p>
<p>freeCodeCamp has not been easy to build. Building freeCodeCamp has required expertise in software engineering, business, media and community development.</p>
<p>The donation-based business model of freeCodeCamp doesn't collect very much money. Why would somebody build a nonprofit when they could spend their time building a highly-profitable software company?</p>
<p>Quincy Larson is the founder of freeCodeCamp, and he joins the show for a special episode about his back story and the journey to building the best place on the Internet for a new programmer to begin.</p>
<p>This was an enjoyable episode for me, because I am friends with Quincy. I’ve spent a lot of time with him, but I actually knew nothing about his background.</p>
<p>If you think about it, it's pretty interesting that somebody would start a nonprofit with his collection of skills. So why would somebody do that? Well, the answer is in this interview, because he has a very distinctive background with a lot of ups and downs.</p>
<p>Learning about Quincy’s story help me understand in much greater detail why he built freeCodeCamp and the related media properties of freeCodeCamp. They have a very popular YouTube channel, a popular podcast, and I recommend checking out those resources.</p>
<p>Thanks to Quincy for coming on the show, and I hope you enjoy this interview with him.</p>
<p>[00:04:05] <strong>Jeff:</strong> Quincy Larson, welcome back to Software Engineering Daily.</p>
<p>[00:04:08] <strong>Quincy:</strong> Thanks, Jeff. It’s an honor and I think it’s been about four and a half years since I’ve been on Software Engineering Daily.</p>
<p>[00:04:14] <strong>Quincy:</strong> Well, it’s been a while since you were on to only talk about that. We had some random shows. You were on with Haseeb. We talked net neutrality a little bit.</p>
<p>We had some random discussions, but we haven't talked about your magnum opus in a while, which is freeCodeCamp, except for when you come to San Francisco, or when you're in San Francisco living here, and we go on runs, or we talk at length in certain contexts, having tacos or whatever, about what you're building.</p>
<p>One of the reasons I think that you and I tend to get along well and always have a lot to talk about is that both you and I are building organizations that don't fit within many conventional rubrics.</p>
<p>There are these kinds of organizations that are only enabled by the dynamics of the Internet, the emergent dynamics of the Internet, and both of us are working on platforms that essentially create and disseminate information about the Internet. I think those two things are closely intertwined, because we are excited about the Internet and its potential, and that's what fuels a lot of the passion behind both of our projects.</p>
<p>So freeCodeCamp, for people who are unaware is gigantic. It helps tons of people. As you said, we did a show four years ago where we talked about the basic rubric of freeCodeCamp, but we’ll obviously get into the architecture of it and the vision for in a lot more detail in this show. We’re going to do a long-form discursive conversation.</p>
<p>To lay the groundwork for that, one thing I want to understand is, is freeCodeCamp a business or a philanthropic endeavor?</p>
<p>[00:06:16] <strong>Quincy:</strong> freeCodeCamp is a 501(c)(3) donor-supported, tax-exempt nonprofit. So it's a public charity. The same designation that the Red Cross, Doctors Without Borders, that a lot of these other big, multinational, nongovernment organizations have. So I would qualify it as a charity.</p>
<p>[00:06:38] <strong>Jeff:</strong> There are charities that are wildly profitable. There are very few of them, like Mozilla, for example. Would you rather freeCodeCamp be a donation-based platform, à la Wikipedia, or something more like Mozilla, where it's a nonprofit, but happens to be profitable?</p>
<p>[00:07:01] <strong>Quincy:</strong> Mozilla is a really interesting case, and from what I understand, it's almost a nonprofit that swallowed a much, much larger for-profit enterprise, like Firefox. I think Yahoo was giving Mozilla hundreds of millions of dollars a year to use Yahoo search as their default browser instead of Google, for example.</p>
<p>Mozilla is interesting because they’re so large because they’re almost a hedge against the more monopolistic tendencies of Google. So I don't know that Mozilla is a model that can be easily replicated by other nonprofits.</p>
<p>[00:07:39] <strong>Jeff:</strong> When you decided to build freeCodeCamp, you’re doing something without much precedent, but you were very confident that it would work. Where did you derive that confidence from?</p>
<p>[00:07:55] <strong>Quincy:</strong> Well, I wasn't super confident initially when I launched freeCodeCamp. But after people stuck around...</p>
<p>So the brief history of freeCodeCamp, and I can go much farther into my personal history later, which I think is relevant. I have never really talked about it before. But this is the fifth anniversary of freeCodeCamp. I think that it's as good a time as any for me to explore that.</p>
<p>But just to answer your question real quick. After people started sticking around freeCodeCamp and after they started progressing through their curriculum and then going out and getting developer jobs. Then in my mind this became a proven model. Because people were able to, without spending any money, without even quitting their jobs or doing anything dramatically different than what they were already doing, just spending an hour a day coding on their own, they were able to transition careers.</p>
<p>Once we saw a whole lot of people doing that, then it became clear that this was a repeatable model and that we could scale it.</p>
<p>[00:08:51] <strong>Jeff:</strong> Describe how your perspective shifted as you started to gain some significant traction with freeCodeCamp.</p>
<p>[00:09:02] <strong>Quincy:</strong> Well, we immediately knew that we could help a lot more people than we were if we continued to scale things up. We could've kept it small. And there's lots less risk in just keeping it small.</p>
<p>It's the equivalent of hand assembling things by Ph.D.'s in a clean room type environment.</p>
<p>Or we could go way out there and just try to help people who traditionally were not able to easily transition to the tech.</p>
<p>So initially, most of the people were here in America. Most of them were already college-educated, middle-class people.</p>
<p>And gradually we've just tried to make freeCodeCamp more and more accessible to people outside of the U.S. and people who didn't necessarily have strong traditional foundational education that we would consider in the U.S. like going to a good public university, for example.</p>
<p>A lot of countries don't have public universities on the order of what we have in the U.S. A lot of people don't have access to even a secondary education that’s on par with what we have in the U.S.</p>
<p>So we have people who’ve now gone through freeCodeCamp who grew up in the slums in Delhi or grew up in the slums of São Paulo and didn't have much education at all, but were able to use freeCodeCamp and learn enough that they could go out and get a job as a developer.</p>
<p>So that was a big jump that we took, and there was no real precedent for this to work. And even when it started working, you have to ask, “Are these isolated instances of extremely motivated individuals who just haven't had enough opportunity, or is this something that really can be generalizable to the point where freeCodeCamp can become kind of a "curriculum of last resort" for people regardless of their social economic background where they can potentially get a really lucrative job and provide for their families, and by extension, inject productivity and economic activity into their local communities?</p>
<p>[00:11:11] <strong>Jeff:</strong> You define yourself as a teacher. At its base, the idea of it teacher throughout history is a very esteemed role. It's a role that in order to be effective requires leadership, and leadership is complex, and difficult, and testing. There's a sense that the esteemed elements of the teacher in the United States for the last few generations has decayed a bit.</p>
<p>I think it has something to do with the increasingly mechanized process, the increasingly corporatized process of the public school system. I'm sure you have some thoughts on this. But what's at the core of your desire, the aspirant desire for Quincy Larson to identify as a teacher?</p>
<p>[00:12:25] <strong>Quincy:</strong> Well, teaching has a long tradition. Confucius was a teacher, right? You can go all the way back to ancient civilizations, and you can see teachers playing a role – Socrates.</p>
<p>This is a tradition that is carried on through the generations, and the role of teacher has become more and more refined in modern times. And usually teachers are fitting into some sort of big school system. Whether that's at the university level or whether that's at a primary school. It's a pretty diffused role.</p>
<p>I would describe Carl Sagan as a teacher. I would describe Bob Ross as a teacher.</p>
<p>The actual definition of teaching is somewhat malleable. So I continue to use the title teacher, since I worked as a teacher for about a decade before I started freeCodeCamp. I continue to use that title because I think that teaching people through instructional design at scale is also a form of teaching.</p>
<p>[00:13:32] <strong>Jeff:</strong> Tell me about the decade of time you spent as a teacher.</p>
<p>[00:13:36] <strong>Quincy:</strong> Well, I will probably have to go even farther back to really tell you about how I got into teaching, because it's pretty complicated.</p>
<p>[00:13:47] <strong>Jeff:</strong> We’ve got nothing, but time.</p>
<p>[00:13:48] <strong>Quincy:</strong> All right. Let’s go way back. So I'm going to go way back to my childhood, if that's okay, and I'll bring you up to speed, because teaching was just one progression, one step toward ultimately what led me to create freeCodeCamp.</p>
<p>The day my childhood ended was April 19th, 1995. I was in Oklahoma City, 9:02 AM. I was in my science class and suddenly all the beakers started rattling and all the tables started rattling. And I'd never been in an earthquake before, but we just assumed it was an earthquake.</p>
<p>All the students, teacher, everybody looked around and look at one another. We saw the room shaking and we didn't know what happened. A few minutes later we found out what had happened.</p>
<p>There was building in downtown Oklahoma City and a terrorist had parked a truck in front of it filled with fertilizer. And he detonated it and killed 168 people, including 19 little babies that were in a nursery on the ground floor.</p>
<p>So that for me was a huge jolt. I went from just being what I would describe as a pretty typical middle-class kid in middle America to starting the question reality, and how we got to this point where something like this wasn't stopped.</p>
<p>Then watching the ensuing chaos, watching how people around me reacted. I had a classmate, she lost her dad. Just that experience really woke me up. From then on, I couldn't really look at reality the same way.</p>
<p>My dad was a strict disciplinarian, and we would always fight. One day when I was a sophomore in high school, I got sick of fighting with him. My grandma had just died and I had inherited her 1986 white Ford Taurus sedan. I grabbed all my stuff and threw it in the car and I just drove off.</p>
<p>I spent the next year of my life just living in my car. Staying in Walmart parking lots overnight where there was light.</p>
<p>At first, I kept going to high school. But one day I was in the cafeteria and a man from my church who had been a huge inspiration to me. He always volunteered to lead Sunday school, and I was really good friends with his kid.</p>
<p>He had a college degree and he’d worked for decades. I saw him in the cafeteria with a hairnet on serving food, and he basically been reduced to doing that to be able to provide for his family. At that moment, I just – within that instant, I just kind of became disillusioned with school and I just decided to drop out.</p>
<p>So I was living in my car, and I just started going to the library every day where it was warm and just rotating through all the different libraries around Oklahoma City. Reading books and just thinking a lot. Then pulling up in the Walmart parking lot and going to sleep.</p>
<p>And eventually I needed money to buy food and stuff. So I got a job at Taco Bell. My manager was this burly guy named Duke who had a very prominent Confederate flag tattoo on his arm that his uniform didn’t cover.</p>
<p>Whenever business was slow, I just run to the backroom, I’d build a burrito real quick and just eat it and just kind of contemplate my life and where things were going and what I was going to do. I really had no idea, but I decided that I probably did need to probably go to school if I didn't want to end up like Duke here.</p>
<p>So I took the GED and I enrolled in the cheapest state university I could, and I traded my Taco Bell job for working at different newspapers around town while I was studying liberal arts. I would just run around with my steno pad and interview people in different positions of power. There were a bunch of rich homeschoolers around the city and I would just go over and teach them. So that was my first experience with teaching.</p>
<p>[00:17:53] <strong>Jeff:</strong> Wait. Sorry. Why are you interviewing people?</p>
<p>[00:17:55] <strong>Quincy:</strong> As a journalist. Basically, I worked for a bunch of different local newspapers. So I’d interview hospital administrators. I’d interview people with the city government. I'd get to talk to all kinds of people, and that was really what gave me a glimpse into how organizations worked and power structures.</p>
<p>[00:18:11] <strong>Jeff:</strong> And laid the groundwork for your future work as a podcaster.</p>
<p>[00:18:15] <strong>Quincy:</strong> Exactly, yeah. That interviewing experience was really important, and the more I talk to people –</p>
<p>[00:18:22] <strong>Jeff:</strong> It’s a great skill, right? Like it’s super flexible.</p>
<p>[00:18:25] <strong>Quincy:</strong> Yeah. You can use it to – If you have a steno pad or a press pass, you can go in and talk to anybody and ask them questions and really get to the core of why they're doing what they're doing and how these different structures work. That was really instrumental for me. I really came into my own interviewing people and learning more about them and learning how these systems worked.</p>
<p>[00:18:48] <strong>Jeff:</strong> Not to take you out of your flow a little bit, but what was your mindset like in the early formative days of this adventure? Because I think when I – Not to take the spotlight off you, but like when I think about my kind of – I went through a lot of like random odd jobs.</p>
<p>I’ve started so many random projects that have gone nowhere, and I think our audience, probably, there're a lot of people who are kind of going through this semi-random walk right now where they feel like maybe they're in a position where they know what they don't want. But they’re in the transition from knowing what they don't want to building positive habits and iterating towards what they do want.</p>
<p>I find that that can be psychologically difficult, but also a psychologically bolstering experience. So I'm kind of wondering where your head was at as you were making your way through the library and Taco Bell and getting your GED and going to a cheap college.</p>
<p>[00:20:04] <strong>Quincy:</strong> Well, for me, things were just so chaotic. The way I viewed the world was there was this appearance of order. But if we drill a little deeper, maybe can see the chaos underneath it.</p>
<p>Why do these structures exist? Increasingly, I started to see why our organizations were all structured around hierarchy where there’s almost always one person at the top and then several layers beneath them. And people show up at the office at a certain time and they do a very specific task and they have deadlines and everything is measured in a certain way.</p>
<p>Everybody's compensation is usually within one order of magnitude of the others, unless you get to these really large corporations where you have executives way at the top that make several orders of magnitude more than the other people.</p>
<p>But I started to think about why. There was a reason why these kind of emergent properties had taken hold. So it was enlightening. I mean, it was really – I felt like I was uncovering some important stuff, especially when I was grilling these different administrators and asking them a lot of questions, learning about how they think.</p>
<p>Why were things the way they were? The more you ask questions, the more questions reveal themselves. It was just this unending onion that I was peeling away layer to layer.</p>
<p>[00:21:32] <strong>Jeff:</strong> It gets bigger as you peel it.</p>
<p>[00:21:34] <strong>Quincy:</strong> Yeah. I don't think that there is like some big conspiracy or anything. I think it's just a whole bunch of people that are operating in this system that miraculously works as well as it does. But it’s probably not anywhere near as effective as it could be.</p>
<p>That was the thing – I guess if I had to describe my experience, it was absolutely invigorating. It was just this euphoria of discovery, like, “That’s how that works. That’s why things are the way they are.” But at the same time, it was very disappointing that 200,000 years in human history and we've got a bunch of people sitting in suits at desks sipping coffee and shifting papers around.</p>
<p>[00:22:18] <strong>Jeff:</strong> Well, to take this further, contrast the invigoration of your active learning process to the stagnation of the traditional education system that you grew so disillusioned with.</p>
<p>[00:22:34] <strong>Quincy:</strong> Well, I can totally see why education is the way it is. I mean, through years of just teaching and interacting with students, interacting with teachers, interacting with administrators, I started to understand that things were the way they were because they were good enough and I kind of came to see a lot of education as childcare essentially. It's the government’s way of essentially relieving parents of their kids for the day so the parents can go and work.</p>
<p>Kids do learn stuff, but it's very suboptimal. I mean, summer break, you basically wipe out months of learning over the course of the summer break. Why do we have still have summer break? Having eight classes a day where they’re each 50 minutes long and kids spend almost as much time transitioning from one class to the next as they do actually sitting down and learning. There are all these things that reveal themselves.</p>
<p>The incredible cost associated with both private and public education. The average student in America, I think we spend like $10,000 to $12,000 per student per year for education.</p>
<p>And this isn’t just like government inefficiency or anything like that, because private schools are much the same. The costs are pretty similar. It’s just that they've shifted to the parents and away from taxpayers to where people are paying directly.</p>
<p>So that, and then when you get to the university level, costs are even higher. For some reason, we now have one administrator for every professor. Just the administrative creep and all these things, like how do you explain the growing bureaucracy? I think a lot of it comes back to human nature. I don't have any particularly satisfying answers for you. I can just say that it works the way it works because nobody has forced through a step change yet.</p>
<p>But I think that such changes are probably inevitable, and I don't delude myself to thinking that I personally can have an impact on this system that is everywhere. Every country in the world pretty much has a similar education system, and has similar higher education system.</p>
<p>[00:24:45] <strong>Jeff:</strong> Well, you are painting the contours of freeCodeCamp in a whole lot more resolute light through telling your history here. I’m starting to understand a little bit more about where you're coming from here. At this point, you're in this transitory state where you're doing interviews as a journalist. You’re going to school. Let's continue down memory lane here.</p>
<p>[00:25:23] <strong>Quincy:</strong> Yeah. So I graduated, and by the time I graduated, I already knew where the big change was happening. It was the early 2000's and there was only one destination that an ambitious person would seek out, and that was China.</p>
<p>China was undergoing a historic state of hyper growth where 300 million plus people were going from subsistence farming to middle-class service sector-type jobs. I wanted to understand that.</p>
<p>So I found an international graduate program, essentially, where I could go and study with a bunch of Chinese. I got on a plane and I flew to Tianjin.</p>
<p>I didn't know anybody there. I was the only Westerner on a campus of 20,000 people. I had a bunch of Korean international trade students who shared a room with me, and I set to work learning Chinese and learning as much as I could about China.</p>
<p>I met my wife there. She was one of my classmates in one of my classes in grad school, and I spent the next two years of my life just learning about China and learning about business through the eyes of China. Learning about the history, learning about the people, and of course spending a huge amount of time just learning both Mandarin and Cantonese, because my wife is Cantonese. We spent a lot of time in the South.</p>
<p>So that was the next period of my life, and it was an exciting time to be alive.</p>
<p>I was absolutely in the right place at the right moment to learn an incredible deal, and that will probably remain the most invigorating and exhilarating part of my life.</p>
<p>Then I came back from China and I started working as a teacher and a school director here in the U.S. after my wife had been granted a visa. Eventually, she was able to become a U.S. citizen. Then I was running schools here in the U.S. and in China.</p>
<p>[00:27:26] <strong>Jeff:</strong> You were how old?</p>
<p>[00:27:28] <strong>Quincy:</strong> I was 26. I was the youngest school director in the school system, and I was just learning about how to run a school now and how to –</p>
<p>[00:27:38] <strong>Jeff:</strong> How do you get there? How do you get that job? How do you get the job as the youngest school director in a school system?</p>
<p>[00:27:43] <strong>Quincy:</strong> Well, when I immediately came back from China, I worked at a convenience store and I was trying to find any job I could that was focused on an international education. I found this one school that was an intensive English program on a university campus, and I just did everything within my power to get that job. I learned everything I could about the people who worked there. I learned everything I could about the history of the organization, and I just went in there like a walking, talking encyclopedia, and against all odds, I managed to get that job.</p>
<p>I remember I interviewed for like six hours on three different occasions, because the director was – she was skeptical that I would be able to do it, because I didn't have any real managerial experience. The teaching experience I had was mostly teaching homeschoolers and teaching engineers from Brazil in China. I would teach them how to use English, because there were just huge swaths of people moving to China to be able to participate in the big economic boom that China was experiencing.</p>
<p>So I was teaching all these expats how to speak English and I was teaching Chinese how to speaking English, and so my teaching experience was fairly limited. I didn't have a master’s degree in education or in teaching English as a second language or anything like that. So I really just had to offset all that by just interviewing extremely well and being extremely knowledgeable. That was a big step, because before that, that was my first step actually into a managerial position.</p>
<p>If you think about what I do today with freeCodeCamp, it's mostly managing teams of volunteers, and then we have a small team of seven people, including myself, who work full-time on freeCodeCamp.</p>
<p>So this is where I learned how to manage people. I was not only managing teachers - I was also managing other administrators. I was managing home stays. Basically, people who open up their homes to welcome students from abroad.</p>
<p>We had a lot of students from China, Japan, from Korea, from Saudi Arabia, from Brazil, and from Europe, and I'd have to work directly with those parents and iron out a lot of the problems. I'd have to work with agencies who wanted to place students in the U.S. I had to work with the U.S. government and the immigration department and just do an incredible amount of paperwork and basically keep this school running.</p>
<p>I went from managing zero people to managing 25 people overnight when I get this job.</p>
<p>[00:30:25] <strong>Jeff:</strong> This is this is also around the time when you started to get serious about technology, right?</p>
<p>[00:30:30] <strong>Quincy:</strong> So after a few years of running schools in the U.S. and China, I was in a situation where I noticed that my teachers were spending a whole lot of time chained to their desk doing menial back-office tasks, like grade reports, like immigration reports, like attendance reports, things that could be automated if I learned some basic things.</p>
<p>So I just Googled around. I learned some Visual Basic. I learned some different tools for programmatically clicking through government visa forms and things like that, and I essentially told my staff, “Hey, I'll take it from here,” and they were able to spend all their time with the students, and the students were so happy, because that's what they came over here for, to learn English and to spend a lot of time with Americans and get ready to integrate so they could go to their graduate programs.</p>
<p>So that was the time that I learned very basic programming and scripting. From there, I saw how powerful it was and I started thinking, “Wow! I could build an entire system that helps schools run more efficiently.”</p>
<p>Then a thought occurred to me, “Well, maybe I  should just learn how to program properly and then I'll be in an even better position to build this tool.”</p>
<p>So I spent nine months just going to hackathons, hanging out at hackerspaces and coding and doing everything I could - working through tons of textbooks, working through free online courses that were coming out of MIT and Stanford, and just every weekend, a different hackathon. I did dozens of hackathons that year, and then I was able to get an entry-level developer job.</p>
<p>When I worked as a developer, that's when the real learning started. And I started learning more and more about working in teams, about using version control, about software engineering principles, about the dynamics of creating software and maintaining software during deployments. Fighting with weird bugs and things like that, and that was the foundry where my developer chops were forged.</p>
<p>After that, I still wanted to help other people. I wanted to build the school management tool, but then I realized, “Well, if I can just help other people do what I did and learn to code, then they can go out and they can build school management tools, and they can build a whole lot of other tools that progress things and move things forward, and create new industries.”</p>
<p>So that's when I decided, “Well, I’m going to learn how to code. Then I’m going to teach other people how to code.” So I started building different projects around technology education, and eventually after several failed projects, I built the MVP for freeCodeCamp over the course of a long weekend. I pushed it live. I started tweeting about it, and people started showing up and using it.</p>
<p>That was a really amazing experience, because that was the first I had ever actually built something from nothing that people cared about, after years and years of building projects that I just couldn't get people to care about.</p>
<p>[00:33:29] <strong>Jeff:</strong> So I think that a big part of what makes freeCodeCamp successful and what will make it continue to grow is there is an aspirational vision to it, and I don't quite know how big that vision is. My sense is that it is big and grows every year, but it's possible that even when you are getting this thing off the ground, you had a vision for what freeCodeCamp could be that is more titanic than what has come to fruition today.</p>
<p>So before we start like diving into freeCodeCamp in gratuitous detail, I'd really like you to pull together the different threads of your unique experience and describe how those came together into the vision for what you are trying to do with freeCodeCamp. I really want to understand the vision and where you are trying to get to with freeCodeCamp.</p>
<p>[00:34:46] <strong>Quincy:</strong> That’s interesting question. So I would say some of the threads that come from my experience, first of all, questioning why things are the way they are. That was something that I learned pretty early on, and that informed freeCodeCamp, because I was able to ask a lot of questions like why do people meet in-person for school? Why do people have this set timeline? Why is school structured to where there is a beginning and an end? Why is there so much reading and some much lecturing in education versus just sitting down and doing it?</p>
<p>Then I started to realize, Well, a lot of the reasons for these things are rooted in convention. A lot of them are motivational, because if you're in a building with a whole bunch of other people sitting next to you, there is extrinsic pressure to perform. If you’re just on your laptop after a long day’s work, there’s not the same pressure for you to actually do the work.</p>
<p>So that informed a lot of freeCodeCamp, just understanding the limits of interactive, online, self-paced learning and understanding the motivational challenges that go along with it.</p>
<p>[00:36:00] <strong>Jeff:</strong> The MVP of freeCodeCamp, it was a certain way of learning to code, and I believe it has advanced quite significantly since then. I'm trying to remember what the first version was. Can you describe how freeCodeCamp has advanced since its MVP that you built?</p>
<p>[00:36:27] <strong>Quincy:</strong> Sure. For the benefit of listeners, when I say MVP I mean minimum viable product - essentially the first version of freeCodeCamp. So, initially, what I built over the course of that weekend was a curriculum where you could progress through. You could sign in and you could mark things done, essentially. Once you marked all of the things done, then you were done and you got this certification for freeCodeCamp.</p>
<p>So the curriculum was mostly external resources, like go take Stanford's computer science 101 class. Here's a link to it, and just work through the classes and then come back and check that you've done this once you finish it. We did the same thing with a lot of other different free online learning resource that were interactive. That was the first version. Important to that first version was I also set up a HipChat room. HipChat is chat room tool, and we would talk in there.</p>
<p>When people joined that chat room, I would be hanging out there and my goal was to motivate people and keep them progressing through there. So I talked to them. I’d say, “Hey, tell me a little about yourself. What inspired you to learn to code?” Leading questions that would waken within them that critical thing, like, “Hey, I should sit down and do this. I could transition into tech.”</p>
<p>So a lot of the early days when we were just trying to inspire people, and two great things happened. First, people would also see what I was doing and they would do the same thing - they'd be right there alongside me welcoming people to the community and asking them questions, and helping them when they got stuck or had any kind questions, or had any moments of crisis of confidence so that they could reassure them.</p>
<p>So that chat room was absolutely instrumental, and people helping me with this process was instrumental. Then people started getting jobs, and that was the tipping point.</p>
<p>Once people started getting jobs, this became a proven thing. This was no longer a toy curriculum that people did merely for self-improvement. It was an actual tool that they could use for economic development for their own personal career gain.</p>
<p>Once they started doing that, people would get a job and talk about how it helped them get a job, and people started contributing to freeCodeCamp.</p>
<p>We slowly replaced the curriculum of external resources with our own homegrown open source BSD-licensed curriculum. The BSD-3 is one of the most permissive open source license alongside the MIT license. We used Creative Commons share like the BY-SA. It’s one of the most permissive Creative Commons license on all the curriculum.</p>
<p>So we were all working on these things together and building up this giant curriculum that, in my opinion, was initially inferior to a lot of the external resources that were taught by university professors, but quickly came to be of comparable quality.</p>
<p>The freeCodeCamp curriculum had one huge advantage - it wasn't some professor talking at you through a video. The entire time, you were in a code editor coding and you had this test suite. And whenever you thought your code was ready, you just hit control+enter or click the button and it ran all the tests and told you whether your code was indeed ready.</p>
<p>You just got into this flow state where you’re progressing from exercise to exercise and learning experientially as you’re building up projects.</p>
<p>So that was a huge breakthrough in terms of motivation, was we sensed that a lot of the problems with traditional learning were just a really loose feedback loop. You sit in a class all semester and take notes and study those notes and then your evaluation criteria comes at the very end when you take the final, and you find out what score you got. It's hard to think of more coarse feedback than that.</p>
<p>But that's what traditional education generally has to offer. Yeah, maybe there are some quizzes along the way.</p>
<p>But interactive exercises were – You’re not waiting weeks or months for feedback. You're waiting a few milliseconds, because this entire platform runs right in your browser. It’s not even sending data back to a server. It’s just running the code right in your browser against a test, and within a few, often, microseconds, you’re getting a feedback.</p>
<p>There’re a near zero millisecond delay - it doesn't even hit the server. So it's about as tight a feedback loop as you can get, and that just really got sticky and people started implementing more and more challenges and the curriculum grew and grew from there.</p>
<p>[00:42:37] <strong>Jeff:</strong> So I remember this time when you and I met for the first time in person. I think it was at a Berkeley taco place, or I think you had a burrito, because apparently your Taco Bell days locked you into burrito mode. I think I remember actually a Quora answer where you also mentioned that much of your daily routine is built around microwave burritos.</p>
<p>So burritos run deep in Quincy Larson's life. But I remember talking to you at this Berkeley burrito place, and it might've been 9 months or 10 months into Software Engineering Daily and you were I guess probably a year and a half into freeCodeCamp.</p>
<p>So we were at kind of like similar junctures where we could feel a sense of traction, and I think you were listening to my show a fair bit around that time, because back then there were just really many software engineering podcasts and people in the states of voluminous isolation, such as yourself and myself, listen to a lot of podcasts, and you are really going down the rabbit hole of understanding software. So I think you are power listener around that time.</p>
<p>So we were having conversations about our respective project/businesses/Internet byproducts, Software Engineering Daily and freeCodeCamp respectively. I feel like both of us at the time were really unsure of what exactly it was we’re trying to get to.</p>
<p>I mean, even back then I think I was like, “Yeah, I mean I kind of hope all sell to O'Reilly, or like maybe start like five other podcasts and be like a twit kind of thing.” I guess those are still like possibilities or something.</p>
<p>But, I don’t know. It just felt early relative to where I think we both are at today where we have a little more confidence, a little more vision, a little more faith that the momentum or the inertia of our platforms will continue to sustain. I mean, I'm still paranoid. You strike me as somebody who's still paranoid about things just falling down.</p>
<p>But I guess I’d like to go back to that time. Because I remember you talking kind of like, “Yeah.” I mean, kind of worried about Treehouse or – What were the other ones around that time? Codecademy, Pluralsight, kind of these other education competitors. I think the market has borne out that online education about coding is just bigger than anybody expected. It's big enough to sustain all these different verticals. Each of them have different competitive differentiators.</p>
<p>But I guess I would like to go back to that time and understand how your vision for the defensibility of the business, or not business, philanthropic endeavor, the finances. Take me back to the early days and give me a bit more refined understanding for how the structure of freeCodeCampus is a sustainable, defensible entity was maturing in the early days?</p>
<p>[00:46:06] <strong>Quincy:</strong> So early on, I was confident that this would be something that anybody could just come and replicate. Technically, it is. I mean, you can still build freeCodeCamp today. But one thing that we had that was really propelling us was this huge community of people who had either graduated from freeCodeCamp who are now working in developer roles or contributors who maybe had done that, but that were still contributing to the community itself.</p>
<p>So freeCodeCamp as an open source software project. Nothing terribly special about that. I think it's very well-built. I think the pedagogy that we baked into it is very astute and it works. It works remarkably well considering that you spend zero money and that you can do it at your convenience over the course of years.</p>
<p>We have people who spend three or four years. I regularly see tweets from people said they started in 2016 and they just finished the final certification in 2019.</p>
<p>So the actual curriculum and the actual platform, nothing that exciting about it. But the community, that is what is really exciting, and it's difficult to build a community like freeCodeCamp has built up over the years, because it takes an incredible amount of hard work, and freeCodeCamp is not some corporate subsidiary. It is not something that’s just bankrolled by a billionaire. It is a community of like-minded people who have similar career goals and similar passions who came together and started building together and built this tool up over the course of the last five years.</p>
<p>So that community itself is by far the most important aspect of freeCodeCamp and the thing that I think other people would have trouble replicating. I say that because it took an incredible amount of work. I spent the past five years helping people answering hundreds of emails a day, going to different study groups around the world and talking to people and trying to cultivate as much leadership as possible as you can within a primarily volunteer-driven organization.</p>
<p>So I would say that I'm not the best developer in the world. I’m probably not the best on the spot like go up and give a lecture style teacher in the world. What I think I am really good at and what I’ve worked really hard to become good at is leading a community and understanding the needs of the people in that community, understanding how we can help those people and how we can help those people help other people.</p>
<p>[00:48:48] <strong>Jeff:</strong> What's been the most difficult part of building freeCodeCamp so far?</p>
<p>[00:48:54] <strong>Quincy:</strong> The most difficult part is absolutely just keeping things running in terms of money. I am profoundly, profoundly bad at asking for donations, at asking for help. And it has really shown, because a couple of weeks ago we had an outage. One of our API servers went down for two days and we did a root cause analysis, as we always do whenever there's some sort of outage. We did this postmortem.</p>
<p>At the end, the only conclusion we could draw, the real finger was pointed back to me and the fact that we are running this organization on a shoestring.</p>
<p>freeCodeCamp is currently I think in the top 1,600 websites on earth. We’re bigger than TechCrunch. All these online learning platforms you mentioned earlier, Udacity, Treehouse, Code Academy, we’re significantly bigger than all those in terms of usage, people using freeCodeCamp.</p>
<p>So how are we able to do all this with a budget of $373,000 in 2019? How are we able to deliver 1.1 billion minutes of instruction that’s equal to 2,000 years of people learning this year? We're not able to do it as well as we should be able to, because we had to cut a lot of corners. Everything has to be done as inexpensively as possible.</p>
<p>So we concluded at the end of that root cause analysis that we probably could have just spent 30 bucks a month on monitoring software that could have detected the specific type of outage and we could have just fixed it and it would've been two days of downtime. There wouldn’t have been this big investigation. But when you're broke, a lot of times the check engine light comes on and you don't have the resources to pull over and have some mechanic look at it, right? That’s precisely how freeCodeCamp has been operating, and that needs to change.</p>
<p>So that has been absolutely my biggest flaw as a leader, and the biggest problem with freeCodeCamp is that I am terrible at fundraising and I need to get better at it. I would say that, sure, I could just hire some corporate fundraising person to go out and get a bunch of donations and foundations to support us. But we are a grassroots organization. We have more than 5,000 people in the community who every month donate to freeCodeCamp. They donate 5 books a month or 10 bucks a month or 35 bucks a month. We want more of that.</p>
<p>We have more than 40,000 people who've gone through freeCodeCamp that are now working at tech companies. A lot of them are at Apple, or Google, or Amazon, or Microsoft. Some of these big companies with big salaries. I need to figure out a way to remind those people gently like, “Hey, if you can support us, we can help a lot more people here.”</p>
<p>[00:51:48] <strong>Jeff:</strong> You need an alumni association.</p>
<p>[00:51:50] <strong>Quincy:</strong> So we have a LinkedIn alumni Association with like 60,000+ people in it. I'm just really bad about admitting that we need money, and I'm bad about asking – I’m bashful about asking for money. That’s one thing I’m working on. That's the biggest bottleneck right now.</p>
<p>[00:52:07] <strong>Jeff:</strong> These universities are falling apart at the seams. Maybe you can pick up some alumni booster who’s recently laid off. Those alumni associations are always hawking the most ridiculous, like, “Oh! You got a bumper sticker for $150 donation.” Like, “Wow! Okay. That's a great deal. I get to say I was a freeCodeCamp alum if I make $150 donation.” You need somebody like that to give these absurd donation.</p>
<p>I don’t know. Speaking more frankly. I mean, you have people like Swicks who has given $10,000 to freeCodeCamp, and he's fairly new to software development. He’s still making his way into building a career for himself. But he already sees so much value in freeCodeCamp that he's willing to give back. So presumably there will be more people like this, especially as you get like people who make their way into entrepreneurship.</p>
<p>[00:53:15] <strong>Quincy:</strong> Yeah, I guess we only need like one Bill Gates or one Jeff Bezos to go through freeCodeCamp to potentially be able to support the organization. That said, I mean, Shawn Wang, Swicks, he gave a $10,000 gift to freeCodeCamp a couple of days ago and he tweeted about it last week. He tweeted with this #payitbackwards, and he wrote this nice article about his reasoning for donating to freeCodeCamp, and I encourage everybody to check that out and to just search for the #payitbackwards. The holiday gifts giving season is ramping up and I’m going to go into full fundraising mode and try to get as many small donations as possible from different alumni. But, that's absolutely something that I'm going to do.</p>
<p>I totally see what you mean about grabbing some person from a university, but it's a very different situation.</p>
<p>[00:54:11] <strong>Jeff:</strong> I was kind of joking. I mean, that wouldn't be good for your brand.</p>
<p>[00:54:13] <strong>Quincy:</strong> So freeCodeCamp so for, every single person we brought on the team, all seven people who work full-time for freeCodeCamp came up through freeCodeCamp. I've never had to do a job interview for freeCodeCamp, because I've already known exactly who in the community is contributing the most. Whom can we give some additional resources to? Whom can we pay not to work full-time on freeCodeCamp, but to be able to devote themselves full-time to contribute to freeCodeCamp. Those are the people we’ve hired. So if I were able to identify somebody within the freeCodeCamp community who can help me with that, yeah, maybe that’d work.</p>
<p>One issue is because we’re running so lean, where we have maybe a of couple months for the payroll in the bank at any given time. It's hard to take a risk of bringing on somebody to do this role. So I'm trying to learn how to do all these stuff myself from reading a lot of books about it. I've been studying the meta-of fundraising and trying to understand how it all works. Reading all the books about nonprofits, and we’re in kind of a unique situation, like whenever we try to get somebody to sponsor freeCodeCamp, they treat us like we’re some sort of hackathon, or whenever we’re trying to get –</p>
<p>[00:55:23] <strong>Jeff:</strong> You mean when you try to get a corporation to sponsor you?</p>
<p>[00:55:25] <strong>Quincy:</strong> Yeah. Whenever we’re trying to get, for example, credits to use, like in-kind donation from a company. A lot of times they’re like, “Oh, is this a hackathon? What is this? What is freeCodeCamp? What’s something like freeCodeCamp?” I have to go on this long explanation of what freeCodeCamp is and why it is the way it is.</p>
<p>There's a lot about freeCodeCamp that sounds unbelievable. I consider that somebody who's inside freeCodeCamp, it seems weird that there is this organization that millions and millions of people use that tens of thousands of people have gotten jobs as a result of using so far, and that the entire thing runs off of the equivalent of like one Silicon Valley engineer’s annual salary.</p>
<p>[00:56:10] <strong>Jeff:</strong> This is why I actually led off the show with the analogies that failed to do it justice. You’re an aberration. You're not Wikipedia. You're not Mozilla. You’re not Craigslist. You are your own beautiful aberration.</p>
<p>[00:56:29] <strong>Quincy:</strong> So a lot of this was just communication challenges. How do we communicate what freeCodeCamp is? How do we communicate the scale? So one thing I did this year when I was preparing for our donation raising run was try to figure out how I can boil freeCodeCamp’s sheer capital efficiency, if you will, down to a concrete number.</p>
<p>So I took that 1.1 billion minutes and I divided it by our $373,000 budget, and I came up with 50 hours of instruction provided for every $1 donated.</p>
<p>So this is convenient way, because when people give us $5 dollars a month we can save, “You’re paying for 250 hours of instruction every time you donate. That's enough for a classroom full of people essentially to be able learn to code for free just from your meager donation. If you give more money, it's equal to an entire village.”</p>
<p>So that's kind of my thinking in terms of how I'm planning to go into the holiday season encouraging people to donate, is just quantifying the direct benefit of their donations.</p>
<p>[00:57:43] <strong>Jeff:</strong> Okay. The $373,000 budget, that's the rough annual budget, right?</p>
<p>[00:57:50] <strong>Quincy:</strong> That is our exact budget for 2019.</p>
<p>[00:57:54] <strong>Jeff:</strong> For 2019, like thus far or projected to be the totality?</p>
<p>[00:57:59] <strong>Quincy:</strong> Almost all of our costs are fixed. So I can project that with pretty good certainty. That's how much it will cost to run freeCodeCamp for the remaining two months, plus the 10 months we’ve already gone through.</p>
<p>[00:58:12] <strong>Jeff:</strong> The big cost, are they developers or servers?</p>
<p>[00:58:14] <strong>Quincy:</strong> Both. But in any software organization, people are usually the main cost. We do spend several thousand dollars a month on servers.</p>
<p>[00:58:24] <strong>Jeff:</strong> I mean, that seems like – The servers at least, it seems like you could just get a company to sponsor you. But then it might almost be like not worth it to deal with the overhang of like are you advertising Azure or like are you in bed with Amazon or something like that.</p>
<p>[00:58:46] <strong>Quincy:</strong> That's been our philosophy. We’re happy to use in-kind sponsors. Amazon gives nonprofits a certain amount of money every month, or every year. We’re able to get like I think a thousand dollars, maybe $2,000 credit from Amazon, and we use that in one month just on the emails.</p>
<p>I send 2.5 million emails a week for our mailing list. So that very rapidly becomes thousand dollars a month just on sending emails. Using Amazon SES, which is the cheapest email service known to man. It's like you can send 10,000 emails for a dollar. So we quickly burn through all those credits.</p>
<p>Microsoft Azure gives us pretty generous credit as a nonprofit. We burn through that. Even with all those credits, we’re probably going to need to figure out some – We use a lot of other tools. For example, Algolia gives us search, and that means we don't have to run an Elasticsearch server. Algolia is in many ways faster than Elasticsearch and it’s certainly easier to configure.</p>
<p>We’ve got all these in-kind sponsors who help us. I think they help most nonprofits, but it's a big help to us. So I don't want to diminish those in-kind sponsorships, but we don't want to be taking huge checks from large companies for precisely the reason you just said. We don't want to be "freeCodeCamp brought to you by Google."</p>
<p>[01:00:06] <strong>Jeff:</strong> This is one of the things that like I think one reason I like talking to you is because whereas you are totally uncompromising in your kind of non-conflict of interest relative to corporate sponsors,</p>
<p>I’m very much the opposite. I’m all about sponsored content. My show is riddled with ads. But I guess I I'm at least like transparent about it. Transparent to the degree that like I kind of can be without impacting the quality of the show. But like I feel that in my own behavior at certain times, can I really talk bad about company X when company X is a sponsor? I think it speaks to your long-term vision that you’re uncompromising there.</p>
<p>[01:01:04] <strong>Quincy:</strong> What you’re working with is a very different model. When you're a donor supported nonprofit – I mean, imagine that you're somebody who's giving to John Hopkins University and you’re like a doctor or a lawyer and you’re like really proud of your $10,000 donation that you just gave to John Hopkins. Then Michael Bloomberg swoops in and gives a $1 billion donation and its 4 or 5 orders of magnitude larger than your donation that to you was a big amount of money. I could just imagine it being really deflating, like saying like, “Oh! Well, should I even bother giving to John Hopkins anymore? I mean, look. They just got all that Michael Bloomberg money.”</p>
<p>So with freeCodeCamp, I'd like to avoid a situation where people feel like their donations don't make a big difference. What’s the point of giving to freeCodeCamp if Bill and Melinda Gates are already giving them plenty of money? For me, personally, I want to give my money when I donate to causes that genuinely need it, where it's going to make a huge impact. I'm not directly practicing effective altruism. I know Haseeb and a lot of people whom you’ve had on the show are practicing – It’s effective altruism.</p>
<p>[01:02:15] <strong>Jeff:</strong> Effective altruism. Yeah.</p>
<p>[01:02:16] <strong>Quincy:</strong> That's where you give some percentage of your salary to a nonprofit and you've made a commitment to you're going to distribute, and there are all these organizations that rank charities by their efficiency. freeCodeCamp, we have a platinum transparency rating on GuideStar.org, I think.</p>
<p>But there's like a great organization called Donors Choose, and that's what Haseeb and a lot of other effective altruism people use. That organization basically ranks charities for their efficacy and helps you maximize the amount of impact that each dollar you give is going to have.</p>
<p>Unfortunately, because freeCodeCamp is so new, we don't have the seven years of tax returns necessary to be able to qualify to be on those lists. So that's one thing that eventually will come and save us, I think is because I am comfortable that we’ll be able to make it on those lists.</p>
<p>I'm confident that, as you said you said, we’re going to start having a lot more alumni who are in a position where they can donate a lot of money. freeCodeCamp will eventually be able to have a lot of resources that we can use, like the Red Cross, and like Doctors Without Borders and a lot of these other nonprofits that are doing tons of work and are able to employ a lot of people toward the cause that they've gone after.</p>
<p>So I’m confident freeCodeCamp will get there. It’s just the kind of rocky intermediary period where everything is held together with duct tape that I'm worried about. Now freeCodeCamp, we could in theory lay everybody off. I could lay myself off. I could just go get a job somewhere and pay for the servers, and I do think that me working somewhere, I could probably afford to keep paying the servers and keep freeCodeCamp on life support. Absolute worst case scenario.</p>
<p>So I'm no longer worried that freeCodeCamp will just blink from existence. That's not going to happen. The real question is how much potential to do good in this world are we foregoing by being so undercapitalized. That's what keeps me up at night, the miss-potential.</p>
<p>[01:04:14] <strong>Jeff:</strong> We won’t go much further on this. But if Bill and Melinda Gates were like, “You know what, Quincy? 2 million bucks a year. You got it.” Would you accept?</p>
<p>[01:04:25] <strong>Quincy:</strong> I’m not sure. I can't definitively say like we would reject that out of hand because there's the possibility that a lot of our donors would be like, “Oh! You should accept that.”</p>
<p>But if it meant that accepting that money was going to cause our small grassroots donations to go down dramatically, I’d probably turn it down. Because in the long-run, it's a much more robust strategy for an organization like freeCodeCamp to have tens of thousands of stakeholders who are donating every year than to have one or two large foundations that control its destiny.</p>
<p>[01:04:55] <strong>Jeff:</strong> How has the market for coding education products changed since you started freeCodeCamp?</p>
<p>[01:05:03] <strong>Quincy:</strong> I think that more and more people have realized that you can get a good job if you learn to code. Things haven't changed enough though. I'm surprised at how little things have changed. If you look at the number of computer science majors in the United States, it hasn't gone up dramatically. It’s gone up a little bit, but not in line with what you would expect.</p>
<p>I am thrilled that there are so many coding boot camps out there that are helping people in their communities learn to code. I'm surprised that there aren’t more. I'm surprised that so many of them have gone out of business, because so many jobs out there are still unfilled that will require coding. Something like 60% of all STEM jobs require programing.</p>
<p>I have plenty of friends who are doing like PhDs in different fields, science, genomics, all these things, and they use programming almost exclusively. That's what they do. They take the datasets and they write scripts to parse those data reliably where they create pipelines to be able to parse data. Anybody who's working with data needs to know how to program, and yet things move so slowly.</p>
<p>That's one thing that’s totally taking me by surprise, is when I started freeCodeCamp, I was so sure that like the government was going to drop tons of money on programming education, or all the money that Google and all these other companies was dropping into education – Facebook, that this was going to make a huge difference and then suddenly there wouldn't be such a huge crunch for developers that they wouldn't be so scarce. That would be good. I think would be great if there could be a million more developers in America, or two or three more million.</p>
<p>[01:06:43] <strong>Jeff:</strong> There's got to be many more though. I think it's just the indexes aren't capturing it, right?</p>
<p>[01:06:48] <strong>Quincy:</strong> I'm not sure. I mean, there are definitely more developers. But you have to understand. I’m so caught up in the meta. I'm on Twitter seeing people posting that they just got a new job. This is kind of the tip of the iceberg. There are so many people out there that – And that's the crazy thing when you start thinking about macroeconomics and you start thinking about how there are billions of people around the world working and there millions of people just in the United States working cash registers and retail, things like that.</p>
<p>You start to think about all these people and then you think about the very, very, very tiny proportion of people who know how to code and how these people that know how to code could completely append these industries and make things dramatically more efficient and unlock so much economic potential, and yet it's not happening anywhere near as fast as we want it to.</p>
<p>[01:07:37] <strong>Jeff:</strong> What do you understand today about coding education that you didn't know at the beginning of freeCodeCamp?</p>
<p>[01:07:43] <strong>Quincy:</strong> I would say that it’s something that I dramatically underestimated was just the motivational aspect of it. Programming is not intrinsically a hard technical thing. I think there are probably a lot of subjects that are a lot harder to wrap your head around than how to create some basic algorithms and data structures, right?</p>
<p>[01:08:03] <strong>Jeff:</strong> That is for sure, man.</p>
<p>[01:08:05] <strong>Quincy:</strong> And yet, it is a very frustrating field to go into, because the entire time you're sitting there with some compiler or with some interpreter telling you you're wrong, you’re wrong, you’re wrong, you’re wrong. You’re getting error messages. You’re getting field tests. Things are not working. You're going and reading stack overflow discussions from 10 years ago and trying to get unstuck constantly. So it takes a lot of grit to learn to code and it takes a lot of grid to stick with it and not just to go out and farm goats or whatever a year or two into your career.</p>
<p>For me, programming is very much a motivational challenge more than anything, and that much has really been driven home as I’ve seen people scrub out of the field so to speak not because they couldn't do it, but because they didn't want to keep doing it. They were like, “Oh! Please give me – Oh! There’s a management job. I don’t have to code anymore. Let me jump to that,” right? So that's one of things we've been working very hard on, is how can we keep people inspired. We’ve got a section on the freeCodeCamp form called You Can Do This, and people when they feel the depth of their frustration, the depths of their despair, they can go there and people cheer them on.</p>
<p>I think all the meet up groups in different cities and all of the different study groups and all these organizations, like Women Who Code like Hack Club. They’re keeping people motivated and pushing forward through the despair and keeping them progressing with their skills so they can gradually acclimate to the strain of being a developer. There's no rule that says you have to eventually quit programming and you have to move into some managerial role, right? There are plenty of people out there who love programming and they've been doing it for decades. So how can we keep people motivated and keep people interested in technology and keep them from burning out?</p>
<p>[01:10:00] <strong>Jeff:</strong> I could not agree more with what you are saying here. The time when I first crossed paths with you on the Internet was when I was on Quora a lot. Part of the reason I was spending so much time on Quora was because I was really having a lot of trouble in my computer science education in college. I think one of the reasons I was having so much trouble is that conventional University computer science education is not built to inspire. It’s kind of built to reinforce this frustration and this ivory tower sensibility of, “Look, the compiler is telling you you're wrong, because you do not belong here, and you are an idiot.”</p>
<p>I felt this reinforced in the mannerisms of many of my professors, like, “Look, if you can't cut it, if you can't write the unit tests, if you can't get your projects done in two weeks, maybe you should drop out. Maybe this major isn’t for you. Maybe you should go to MIS. Maybe you should go back to business school. Maybe you should get out of here.” They really would take this attitude that like, “Maybe you should take a step down.”</p>
<p>That's not the attitude that an educator should take. The educator should basically take, “Look, what do we need to do to reshape your mind so that you can actually succeed in this field, because it's really not that hard.” Yeah, I mean there was something about Quora. There was something about just Internet culture. The Internet culture has the elements of inspiration that you need – I mean, Seth Godin, somebody who I’m a fan of. I found his podcast around that same time and he's all about basically like give the middle finger to these people who tell you that this is not something that's doable. It is going to take grit, but it's actually not going to take much more than that.</p>
<p>[01:12:06] <strong>Quincy:</strong> What you described with the university experience that you went through, that’s an unfortunate reality in a lot of universities today. Here in the U.S. and also oversees, there’s this kind of elitism. I'm not sure exactly why it is. It could be just rooted in the fact that university professors are fighting so hard for such scarce positions in academia.</p>
<p>[01:12:29] <strong>Jeff:</strong> And the math and physics lineage of computer science.</p>
<p>[01:12:33] <strong>Quincy:</strong> Yeah. But the reality on the ground, it couldn't be more different from that scarcity that those arbiters are trying to reinforce. The reality is there are incredible opportunities, and this is something not just with software engineering, but I think with medicine. Medicine has this almost kind of ritualistic hazing process they put all the physicians through, and medical school is brutal, and [inaudible 01:13:53] is brutal.</p>
<p>[01:13:54] <strong>Jeff:</strong> I don’t know if I’ve told you this, but I was premed until I took organic chemistry. There was this semester I took organic chemistry. I was like, “Okay. All right. Fine. I got vetted I'm out. Peace.” I would do the exact same thing. Yeah, the weeding processing. Sorry. I’m sorry. Not to take my seat at the couch.</p>
<p>[01:14:13] <strong>Quincy:</strong> It is really unfortunate that as of late 2018, so much of education is still like this. It’s still some – Almost always a man who has gone, walk through the snow uphill both ways and wants to see to it that you do it too. What does this affect? Well, if you want to look at why the profession is so homogenous, it's because people who can't visualize themselves can't find people who look like them or come from backgrounds like them in the profession. They don't even have that glimmer of hope that you or I might have seeing some guy who looks like our dad, for example, who's in the field and saying, “Well, we can do that too.” They don't even have that.</p>
<p>So there's even less to help empower through this process of weeding. So, yeah. I'm optimistic that if anything, freeCodeCamp can present competition to the University computer science programs and force them to become more inclusive and quit hazing people. freeCodeCamp can essentially, by increasing the quality of what's available for free, force everybody else to up their game .If nothing else, I will be very proud of that contribution to education that we raise the floor.</p>
<p>[01:15:38] <strong>Jeff:</strong> Do you see a continuation from the education of computer science fundamentals, software engineering best practices, security data science, et cetera, these things? Do you see a continuation from those into perhaps lessons about entrepreneurship? Do you want freeCodeCamp to be a place where you can go full stack from learning to code to building a software company?</p>
<p>[01:16:16] <strong>Quincy:</strong> So here's my thinking on this, and I realize that this may be contrary to a lot of popular opinion and a lot of wishful thinking about entrepreneurial. I think that before you can be a successful entrepreneur, you should go out and you should work for other people and you should manage other people within an existing organization. Otherwise, you're going to be somewhat naïve and you’re going to have to make a whole lot of mistakes on your own dollar or on your investor’s dollar, and a lot of people are going to suffer from those mistakes who would be somewhat insulated from them if they were in one of these organizations.</p>
<p>So I spent about six years running schools, and that managerial experience was absolutely essential. freeCodeCamp would not exist if I were some fresh college grad who was trying to create a project like this. I think there’s a reason why the median age of a successful entrepreneur is usually in their 40s or 50s, because they've been around. They've worked with an existing system. They understand not only how things are, but why things are the way they are. Thus, they are able to think within those constraints and make slight tweaks to those permutations and make their organization successful.</p>
<p>The key to success is not in bucking convention. It's in knowing which aspects of convention to keep in place in which aspects to discard, that selectivity. So the idea of freeCodeCamp becoming kind of like learn to code and become an entrepreneur I think is probably beyond the scope of freeCodeCamp, because I don't know the that's necessarily possible to do reliably. I do think that people should go out and get jobs. I think that is one thing the freelance, and that's a great way to get a job, but you really should work at a company with a team of software engineers alongside you and a product manager and stakeholders and customers and all those things so you can better understand the entire software development process.</p>
<p>I guess maybe if I’m a little more bearish on entrepreneurialism, it's just I'm cautious. I've seen people go out and destroy their life savings. I’ve seen people go out and destroy their reputations by taking too many risks to quickly. So life is long. Human lifespan ideally should be increasing. I'm almost 40 and I'm hoping to live a hundred, and I’m going to keep learning along this entire process, but I would encourage people who relatively early in their careers to keep working and learn on the side and keep learning as much as they can on somebody else's dime before they go out there and they try to do a risky experiment, because entrepreneurship is one – I think the definition of entrepreneurship is somebody who bears risk and you have to be ready to bear that risk. You have to have savings. You have to have a plan B if things go south. All those things will set you up for success more than just taking an online course and trying to throw yourself into entrepreneurialism, in my opinion.</p>
<p>[01:19:31] <strong>Jeff:</strong> I want talk about software architecture and software engineering, because you had this – As you said, this post about how what went wrong with freeCodeCamp servers. You also had this recent post about freeCodeCamp at five years. Your software architecture has gotten pretty complicated. You've got a lot going on. You've got serious engineering challenges because you are at scale. I mean, what are you? The 1700th most popular site according to Alexa rankings? Something like that?</p>
<p>[01:20:10] <strong>Quincy:</strong> I had to look it up, but we are currently 1589th as a recording.</p>
<p>[01:20:18] <strong>Jeff:</strong> That is indicative of a ton of traffic. The reason there's a ton of traffic is because you have a lot of content. You have a lot of curriculum. I'd like to talk – We don't talk in gratuitous detail about how the curriculum works today, because I think probably a lot of the people listening are students of freeCodeCamp, or people who have seen it before. But let's just talk through like the contours of freeCodeCamp at a high-level, like freeCodeCamp as a product, and the product surface area. Then we can dig into some of the interesting architectural problems that you deal with with a product that is at this scale, at this throughput, and with the small of a budget. So you have all these interesting cost tradeoffs to make as well. So let’s first just talk about the product surface area.</p>
<p>[01:21:13] <strong>Quincy:</strong> Sure. So freeCodeCamp is really three different core applications. There's the curriculum and portfolios. That's one of the pillars, and that is all custom code for the most part. That's when we say the platform. That’s generally what we’re talking about. We also have freeCodeCamp.org/news, which is our publication, and we publish several articles a day there often in-depth explanatory journalism, biotechnology. Then we have the freeCodeCamp forum, and that's the third pillar of freeCodeCamp.</p>
<p>Now, all three of those run on separate servers. The freeCodeCamp forum is powered by Discourse, which is a really cool self-hosted open source forum tool created by the founder of Stack Overflow, Jeff Atwood and his team. That's very well-maintained, and you can get your own instance of discourse running really easily if you want to. You can just deploy it to the cloud and it will live on its own server in a Docker container, and there you go. Same thing with freeCodeCamp.org/news. That is running on Ghost, which is another self-hosted open source project that just released version 3 of their tool. It's like the WordPress, but it doesn't have a lot of the baggage that comes with WordPress. WordPress is excellent, but it does have some vulnerabilities and it does have a very complicated plug-in system, and WordPress is trying to do a lot of things, whereas Ghost is just trying to be a publication tool.</p>
<p>So we have maybe 7,000 articles on freeCodeCamp.org/news at this point, and we have hundreds of thousands of posts on freeCodeCamp.org/forum. So those are those two. Now, if you want, I can drill into what powers the freeCodeCamp platform, the core curriculum.</p>
<p>[01:23:17] <strong>Jeff:</strong> Please do.</p>
<p>[01:23:18] <strong>Quincy:</strong> Yeah. So we are running React on the frontend. We’re running node as the backend. We’re running a tool called Loopback, which is an API tool. It essentially turns your entire app into an API where all the routes can fetch JSON as well as HTML. It's something that’s already baked into tools like Ruby on Rails. With Ruby on Rails, you could take any URL and you can just put .json at the end of it and get a JSON representation of the data and that route. So Loopback does a lot of stuff.</p>
<p>We use MongoDB for our database and we have a managed cluster that’s MLab, and we’re working on moving that over to MongoDB's new Atlas tool. MLab was acquired by MongoDB recently. So they're kind of sunsetting MLab, I think. So we’re in the process of moving everything over. But it's good to have a big sharded system, because we have a lot of data. We've got millions of records, and each of those records has millions of challenge completions and a whole lot of other data that they’ve added to their portfolio.</p>
<p>The portfolios themselves, we’re working on growing them and making them a lot richer in terms of just having a lot more data. You can submit a whole lot of different projects you’ve built from outside of the freeCodeCamp curriculum as well. If you built your own JavaScript game, for example, you could submit that. Turning that more into kind of like a LinkedIn light for developers. So we’re working on that.</p>
<p>The platform itself in terms of the curriculum is a Gatsby app, and you hit that URL, freeCodeCamp.org/learn, and the entire curriculum loads and it stays in your browser, all of it, like thousands of challenges. Then when you complete challenges, it will post those to the server. If you disconnect from the server for some reason, you can keep completing challenges. Then when you reconnect, it will push all that to freeCodeCamp servers. So we’re very close to having it be fully offline functional app, like a progressive web app in that regard. It's not quite there, but we may be just a few months away from that. We’ve been tinkering toward that for the past year.</p>
<p>[01:25:42] <strong>Jeff:</strong> That is sick. I mean, well the offline functionality, that something that developing countries – I mean, that's a necessary – To have a buttery experience, you need that kind of offline functionality.</p>
<p>[01:25:56] <strong>Quincy:</strong> What you just said about people in developing countries, freeCodeCamp is founded on a single principle, and that is access. That doesn't just mean accessibility in terms of blind people being of able to use freeCodeCamp. People with motor skill impairments being able to use freeCodeCamp. All those people can use freeCodeCamp. We’ve got a 100 Lighthouse score for accessibility, and we take that into consideration with everything we do.</p>
<p>But also people who have frequently interrupted power, frequently interrupted Internet access. So not only are we trying to build the PWA that addresses all those concerns and not only do we make our data as small as possible so the entire freeCodeCamp curriculum fits in a footprint of just a few megabytes. But we’re also working on eventually getting an android app on, and maybe even an iOS app. Because so many people in India, so many people in Nigeria, other countries where a ton of people use freeCodeCamp, Pakistan, Kenya, places like that, we want to make sure that they are able to use it on their own devices, and people don’t necessarily have laptops.</p>
<p>So we recently just completely overhauled the mobile freeCodeCamp experience, the mobile web version, to make it easier, put everything in a tab so you can move between your code, your tests and your HTML preview your console output. We’re also working to make it to where it runs natively so that you can just download a freeCodeCamp app from the App Store and you’re good. Then when you have Internet connectivity, it pushes all your stuff up and you can still claim the certifications and everything. But we’re moving more and more of that into freeCodeCamp.</p>
<p>For example, right now, most of the projects are built on CodePen, which is awesome. We'd like to make it where all those can be built right on freeCodeCamp so you don't need to go to an external website in order to build your projects. We’re also working with some code that Mozilla has just put out to be able to run Python in the browser too. So we’re going to be teaching data science concepts with Python and we’re going to be teaching TensorFlow, NumPy, Keras, a lot of these libraries in Python as part of our core curriculum.</p>
<p>[01:28:02] <strong>Jeff:</strong> I think the entirety of the backend architecture is too complex to portray to people over a podcast unfortunately, but it is an interesting backend, and I encourage people to check out your articles, your recent articles about it on freeCodeCamp News. But just to give him a little bit a context for the kinds of problems that you need to work through, can you tell me a particularly difficult engineering problem – I mean not the one that you outlined in your recent post, because you kind of laid that out in gratuitous detail, or maybe if there's details that you didn’t layout. We could go further into that. But I just like to know a particular scalability bottleneck or some kind of difficult backend engineering challenge that is emblematic of the kinds of software engineering problems that freeCodeCamp encounters.</p>
<p>[01:29:00] <strong>Quincy:</strong> I would say we have of those backend-specific challenges from scale and from the way we’re architectured and things like that. But perhaps more interesting would be the overlap between instructional design and engineering that we've had to navigate. So we very early on decided that we wanted everything to run client-side, like all the tests run client-side. That’s to minimize the amount of latency. It’s also to just minimize variability and things like that. So it's been a real challenge to get a lot of these subjects taught in a fully-interactive client-side tested way.</p>
<p>So some of the early things we had to struggle with, for example, is how are we going to teach, for example, Rest APIs and specifically how are we going to teach Ajax and things like that interactively in the browser. So those are things where we've almost had to tailor the instruction to the medium and the constraints of the medium. So that has been an ongoing challenge, and we’ve just had breakthroughs over the years as to how we could test different things in that. How we could –</p>
<p>So one of the big breakthroughs recently was – I think about a year and a half ago, we decided that the test suites, the projects originally, you didn't have test suites associated with them. You just have to build it and then we would manually review it and other people give you feedback on your projects. But there wasn’t that tight feedback loop of like, “Oh, this project doesn't – This project does exactly what it's supposed to do and it looks the way it does.”</p>
<p>So what we did was we created the this API endpoint you can hit and you can download a test suite right into your project wherever you’re building it. Whether you’re building it locally on your local computer, whether you’re building it on a CodePen, whether you're building it on just like a GitHub pages app that you’re deploying in Netlify or something like that. You can load this test suite and you can run it right against your code. So whenever you submit the URL, you're also certifying that it passes all of these tests. So there’ll be maybe like 15 or 20 different tests in a test suite for these different projects.</p>
<p>freeCodeCamp, if you all don't know, is essentially all projects. We have lessons right now. We’re getting rid of those lessons and we’re replacing them with practice projects where you learn JavaScript by building a role-playing game, for example. You build a fully-functional role-playing game where you’re going like fight a dragon, get a sword, build up your health points and stuff like that. But you build that line by line with JavaScript. That's how you’ll learn JavaScript, is building a role-playing game.</p>
<p>[01:31:39] <strong>Jeff:</strong> I mean, unless you want to drill deeper into that engineering problem, I kind of want to jump on what you just said, the idea of building a role-playing game rather than having these specific lessons.</p>
<p>[01:31:51] <strong>Quincy:</strong> Yeah. We always wanted to have fully project oriented learning, and to some extent, the existing freeCodeCamp curriculum, like when you build the first HTML app, you’re building up kind of like a can photo app. But it’s still a series of discrete lessons, right? The new curriculum that we’re building, we’re calling it version 7 of the freeCodeCamp curriculum, is totally projects. So instead of having a series of discrete lessons, instead you’ll just have a giant code editor that will take up almost the entire screen and its Visual Studio code. We’re Monaco, which is the browser version of Visual Studio code.</p>
<p>[01:32:29] <strong>Jeff:</strong> Oh, sick!</p>
<p>[01:32:30] <strong>Quincy:</strong> Yeah. So you get all the syntax highlighting. You get all the tab completion, all those functionality, right? You don't have the full IDE experience, but you can pull some of that in. Anyway, what it’s going to be is there’s just going to be a giant code editor and we’re going to split the code editor open and there will be a test inside of that right above where you need to change the code or type a line of code. Them you pass that and, boom! The code editor closes up and then a new rift forms below on the next line, and there's a test. Everything is taught through a series of tests that you have to get past.</p>
<p>So you’ll get hundreds of tests passing. Through the process, you’ll build up this sophisticated application. There’ll be a lot more repetition than there is currently. That's one of the big complaints about the freeCodeCamp curriculum, is that we hit a whole bunch of topics in rapid succession and we don't necessarily revisit them as much until you get to the certification projects. Well, we’re going to try to engineer a lot of repetition in there to help – Even though recall is not nearly as important with software development as recognition is, and in certain fields, recall is everything. That's why the entire U.S education system is basically based around retention, right? You remember all these facts so you can pass this test. With software engineering, everything is only a Google search away.</p>
<p>But we’re still – Because that's how people are trained in pretty much every education system on earth, they’re trained that you have to retain things and you shouldn't – There's a discomfort associated with having a vague remembrance of something, but not having like concrete that you can recall. So we’re almost – It's a concession to how people are or meeting people where they are, as supposed to where I our pure teacher’s minds where they should go. But we are going to incorporate more repetition for that very reason to make people feel comfortable, because that's one of the most common reasons people give when they quit freeCodeCamp. It’s like, “Oh, I didn’t feel like I was learning anything. I didn’t feel like I was retaining anything. I did all these stuff and at the end of the day I couldn't remember the exact syntax of how you make a Boolean declaration in JavaScript or something like that,” right?</p>
<p>So there's going to be a lot more repetition, but you're going to build through a series of just discrete tests every single step, a single test that you have to get passing. Boom! You move on to the next one, and you're going to get into this flow state where every 30 or 40 seconds you’re going to get test passing and you’re moving forward, and hopefully like one sitting you're going to build out an application. So you’ll build – Right now, the entire freeCodeCamp curriculum is 30 projects. By the time we’re done with this version update, it's going to be closer to 100 projects that you’ll build.</p>
<p>[SPONSOR MESSAGE]</p>
<p>[01:35:22] <strong>Jeff:</strong>  Feature flagging makes it easy for your team to quickly change the way that your product works, and CloudBees Rollout lets you manage feature flags easily. When you have a solution to manage feature flags at scale, you’re empowered to continuously and intelligently rollout changes as soon as they are code complete on any platform, even mobile. You can decouple development from code release for a real-time change control. You can rollback only the changes that you don’t want, or keep them around.</p>
<p>You can toggle features. You can use multi-varied flags for A-B testing and you can remove misbehaving features with a kill switch. All of these is part of the feature flag platform that is CloudBeess Rollout.</p>
<p>Visit softwareengineeringdaily.com/cloudbees and try a free 14-day trial and experience how CloudBees Rollout can help you with every release. Visit softwareengineeringdaily.com/cloudbees to get a free trial. Cloudbees Rollout is trusted by large users, such as Zendesk and Jet.com. Try it out today at softwareengineeringdaily.com/cloudbees.</p>
<p>[INTERVIEW CONTINUED]</p>
<p>[01:36:46] <strong>Jeff:</strong> It's interesting that the move from having – Like I can imagine the initial lesson plan for freeCodeCamping, like, “Okay. First you do Hello World. Then you figure out how to parse JSON. Then you figure out a two string method or something.” The kind of like boring boilerplate stuff. I think what I'm hearing is you’re finding that the boring boilerplate material can be exhaust. That can be a side effect of starting with something that is exciting and fun to do, and perhaps adding a little bit of repetition, a little bit of a slower pace, but focusing completely on the project orientation, because that is more fun and that the motivation is so important there, and you will be able to get the boring boilerplate stuff just as an additive outcome from the project-centric focus. Am I understanding that correctly?</p>
<p>[01:38:06] <strong>Quincy:</strong> Exactly. My economics teacher when I was in grad school, he sat me down during one of our office hour session and he grabbed a book off his shelf and he started just – He laid it on the desk and he started flipping through it and there was just a bunch of equations. He said, “This is my economics PhD. This hundred-page book has all the equations that we use for my economics PhD. I spent six years after undergraduate learning this stuff, and it all fits in a 100-page book.”</p>
<p>But that is just the raw facts, right? That completely disregards the human element of how we grapple with learning, how we retain, how we internalize those lessons, right? People don’t sit down and start memorizing equations. That’s not how humans work. That's how computers work. Computers are very good at retaining facts perfectly. Humans don’t work that way. Humans learn through experiences. So a lot of our journey with freeCodeCamp toward watching how millions of people interact, watching who decided to keep going, who makes it at the end. What powers them through? What kind of projects they build? How their projects are different from people who stop halfway through? All that has been kind of crystallized in this pure project-oriented orientation the we’re taking now with the big update to the freeCodeCamp curriculum coming in 2020.</p>
<p>[01:39:38] <strong>Jeff:</strong> Do you try to like test it? Do you throw it at new users in kind of a slow onboarding fashion, or do you have enough faith that this is the direction to move towards such that you don't feel like you need to kind of do an AB testing and gradual shift of the curriculum?</p>
<p>[01:39:59] <strong>Quincy:</strong> AB testing is really good for something, right? It’s really good for determining like what color of a button is going to get people to convert in your shopping cart, right? It’s less good for something where you’re trying to walk somebody through a very complex experience.</p>
<p>I have no doubt that when people say there's more of an art than a science to something. They don't yet know the sites of it. I have no doubt that there is probably some very good way to AB test and to arrive at a totally optimal solution, but I do doubt that we’ll be able to do that in a time effective manner. So to some extent, yeah, we’re just throwing this together, our best guess, and then we’re going to put it up and there we’re to see how people react with it. We have really granular data. We know exactly how many seconds on average people spend on a specific challenge within the freeCodeCamp curriculum. That's how we've identified a lot of the bottlenecks.</p>
<p>My philosophy has been people shouldn't spend more than two minutes on a given lesson and they should be able to figure out how to do it from the instructions and from the test messages, and they should be able to progress. So we find those outliers and we’re able to go in and tweak the wording or maybe break it out into several lessons in order to make it easier for people to get through.</p>
<p>With these with these new projects, we’ll be able to do the same thin. We’ll be able to identify which tests out of the 200 or 300 tests associated with building this project is the stumbling block and smooth that out. As far as rolling out all the projects at once, a lot of it is not so much a teaching issue as it is a communicating issue. How do you communicate to the millions of people who are using the freeCodeCamp curriculum that, “Hey! This is changing. You’re not going to have individualists lessons.” Now you’re going to build projects,” and trying to do that in a piecemeal fashion where you’re like communicating to one person, “Okay. These lessons went away, but now we’ve got this project.” It’s just a lot easier in our experience to rip the proverbial Band-Aid off than it is to slowly inch it off.”</p>
<p>That’s been our approach, is generally we observe. We figure out what we think the next step is and then we work really hard and then we ship that next step. It is to, some extent, in conflict with like Agile software methodologies and a lot of other findings that I think work really well for other types of products. But for our curriculum, it's better to proceed in bounds than baby steps.</p>
<p>[01:42:29] <strong>Jeff:</strong> The people who are writing the code for freeCodeCamp, what's the balance or the portion of time spent and difficult problem solved between – Because it's open source. What's the distribution between people who are paid employees versus open source philanthropic contributors?</p>
<p>[01:42:59] <strong>Quincy:</strong> freeCodeCamp’s team is seven people. I can go and list them real quick for your benefit. So that’s me. I work full-time. Beau Carnes. He runs our YouTube channel. He does a lot of instructional design. He's been working as a teacher for the past five years.</p>
<p>[01:43:13] <strong>Jeff:</strong> By the way, instructional design, you mean developing and creating curriculums?</p>
<p>[01:43:16] <strong>Quincy:</strong> Yes. Instructional design is basically teaching at scale. That's how I define it. Baking the teaching into the materials. He’s an experienced classroom teacher. He was teaching middle school for the past five years and he had worked as a software engineer for a while as well. He'd been contributing to freeCodeCamp for years, and then we were able to bring him on full-time.</p>
<p>Then Mrugesh Mohapatra. He’s in Pune, India, and he is doing a lot of our major architectural decisions. He has worked at a bunch of different multinationals in India and has a traditional software engineering background, but he’d been contributing to freeCodeCamp for like three years before he came on.</p>
<p>Ahmed Abdolsaheb is based in Turkey. He is a designer and a developer, and he had also been working with the freeCodeCamp curriculum and contributing to freeCodeCamp for years before we brought him on. He does a lot of the design work. You will notice that freeCodeCamp has a fresh coat of paint when you go there. We have redone the design style guide and we’ve adapted a cell I’d to call Command Line Chic, which is heavily modeled after kind of almost retro competing aesthetics with contemporary accessibility sensibilities. So he does that.</p>
<p>So that almost rounds up our development team, but we also have Kris Koishigawa who's in South Korea, and he is a developer who work as an English teacher in Korea for the past six years. He contributing to the freeCodeCamp cocaine curriculum extensively, especially the interview practice preparation sections, writing test for like the Project Euler problems and Rosetta Code problems and things like that. He did that for a few years and now he's working full time with freeCodeCamp.</p>
<p>Kris and Beau are primarily focused now on curriculum development. Again, both of them have strong teaching backgrounds and both of them are able to contribute to the codebase, but that's primarily what they're doing. Then not working so much on the codebase, but working on the content side of things. Abbey, Abigail Rennemeyer. She’s out in Portland and she is the primary editor for the freeCodeCamp publication, freeCodeCamp.org/news. She edits virtually every article that gets published there, thousands of articles a year. She also writes and she runs the podcast, and she also runs all of our social media.</p>
<p>Then Miya Liu is based in Hangzhou and in Chengdu in China, and she runs the freeCodeCamp Chinese community. The freeCodeCamp Chinese community is almost kind of like a parallel freeCodeCamp. We have hundreds and thousands of people who use freeCodeCamp over there, and we have tons of major communities and major cities where people get together and come together. So that’s a big part of freeCodeCamp is what Miya is doing over in China. So that rounds up the entire team.</p>
<p>Now, in addition to them, we have dozens of monthly active code contributors who are contributing code directly to the freeCodeCamp platform. Some of them are also making incremental tweaks to the curriculum. Then we have a ton of contributors who are contributing to the publication. We have contributors who are contributing to freeCodeCamp’s YouTube channel. freeCodeCamp’s YouTube channel is now the biggest programming channel on YouTube, other than the New Boston, which kind of shut down four years ago. It still has more subscribers than we do, but freeCodeCamp YouTube channel has kind of taken on a life of its own and its getting like 500 million minutes of watch time a year.</p>
<p>[01:47:03] <strong>Jeff:</strong> So managing the open source project though, is there a much open source contribution? Because like there are a lot open source projects where like MongoDB, for example, like most of the contributions to MongoDB as I understand our from the company. There’s nothing wrong with that. Open source is kind of like – It’s just like a side feature of a lot of software products. It’s a gesture? Open sourcing your software is a gesture, but it's not necessarily like open sourcing your software means you’re Linux or Bitcoin and there's going to be like this tidal wave of people who are friendly contributors just dropping in and solving bugs that take them hours to dig through lines of code.</p>
<p>It's more like maybe you have somebody like maintaining the SSL library that's holding the Internet together, of you have like a person and a half  that are keeping those libraries together. But it's really not like this avalanche of people that are just generously contributing. So it sounds to me like you're more like the kind of the MongoDB school of things where it’s like –</p>
<p>[01:48:19] <strong>Quincy:</strong> I would argue that we are much more the opposite. Most of the contributions do come from the community. A lot of the big work is done internally just because there's less communication overhead and we can be more –</p>
<p>[01:48:35] <strong>Jeff:</strong> It’s like big, heavy re-platforming work. The stuff that really takes like the deep work.</p>
<p>[01:48:40] <strong>Quincy:</strong> Yeah. Then we do occasionally have open source contributors who do significant deep work too. Just to give you some numbers, since I pulled it while you’re talking. Just in the past week, October 22nd through the 29th, we've had 66 proposed pull requests. We merged 27 of them. Most of those have come from outside of the freeCodeCamp full-time staff. Same thing with lots of issues. There have been a total of 1,458 additions and 624 deletions to the codebase in the past week. If I look at the contributions, I can see that only about eight of those were from people working full-time out of the 30 commits pushed so far this week.</p>
<p>[01:49:24] <strong>Jeff:</strong> Okay. Interesting. One thing, as you're talking about all these different areas of the freeCodeCamp brand, you got not just the full curriculum that is an amazing product of its own. You’re a media company. You've developed both a deep vertical expertise and teaching people to code, and a horizontal expansion that has been so well-executed that you have basically the biggest programming channel on YouTube. You have super active forums and content and chat rooms. I think your Slack channel was – I think you broke Slack, right? You literally like break the Slack free plan or something.</p>
<p>[01:50:16] <strong>Quincy:</strong> So we discovered a limitation within their infrastructure, that they can only have a certain number of people, and it was undocumented limitation. We hit it, and we had to quickly switch from their platform to Gitter, which didn't have that limitation. We still use Gitter. We still have contributors there, but we've shifted a lot of it over to the forum now.</p>
<p>The forum is great, because for every one person who's logged in, like writing answers to other people's question, there are 19 or 20 people who are just jumping in and from Google who are reading that exchange and benefiting from it.</p>
<p>[01:50:50] <strong>Jeff:</strong> That is sick.</p>
<p>[01:50:51] <strong>Quincy:</strong> Yeah, it's great. We’re helping a lot of – When you go to the freeCodeCamp forum and you hang out there and you help answer people's questions, or when you ask a question, you're not just helping yourself. You’re not just helping that person whom you're talking to. You’re helping dozens of people. In some cases, some of these forum threads have had hundreds of thousands of views.</p>
<p>Yeah, you never know what problem that you're experiencing personally could be something that a whole lot of people are experiencing. By having that exchange right out there in the open in a way that’s really easily indexed by Google, we are able to help a lot of people indirectly that way.</p>
<p>[01:51:25] <strong>Jeff:</strong> Let me ask you a question, because we both come from Quora. We both have deep affinity for Quora, and I feel almost like a debt of gratitude to Quora. That's how much I love that platform. But I almost wish that the software to build Quora was open source. I wish that so many things and that platform could just be like subset it out into their own products and turned into like highly verticalized things, because now the product is kind of – It’s sprawling, and I wish it was more – I don’t know. I wish it was like the old days, which is what everybody says about every Internet product that they used to love.</p>
<p>Wouldn't it be cool if you had your own like – Instead of – Discourse sounds great. But it would be better if it was Quora, right?</p>
<p>[01:52:22] <strong>Quincy:</strong> It's not really a fair comparison, because the guy who founded Quora, Adam D'Angelo, he is the closest thing to a software engineering genius that I know of before he created Quora and took hundreds of millions of dollars of his own money and funded it. He was the CTO at Facebook, and he just had so many incredible insights that I think we’re missing from Stack Overflow, and is certainly missing from Yahoo Answers and other sites that he was competing with. That platform is just remarkably well-built and well-thought out and it works amazing.</p>
<p>So I have nothing but good things to say about the way Quora is built. I think it would be a very tall order for a team even with the head of Stack Overflow helming it to create something as refined as Quora. That said, the spirit of Quora, which is asking and answering questions and all that, that can work on any platform if you have the community of thoughtful people who are willing to turn around and show their expertise and their insights with one another.</p>
<p>So the tools themselves – You could give Quora, like you could take the existing codebase and give that to kind of a community that's marginally active and they wouldn’t necessarily be able to do that much with it. But you can give PHPBB or some really old form tool to a vibrant community of people who are really passionate about something and they would build up a huge, huge ecosystem of questions and answers and people helping one another and come up with these great forum admins and forum moderators and all that stuff. That stuff would just organically bloom.</p>
<p>So if anything, if freeCodeCamp has succeeded, I would say like the forum, the reason it’s succeeding is because we have that community, we have these super passionate moderators and people who genuinely love helping other people that have come at it. That's why Quora has been such a huge success too, and that's why you and I were out there, because we both felt a big affinity for one another and for other people who were interested in software engineering and we enjoyed answering their questions there.</p>
<p>[01:54:35] <strong>Jeff:</strong> Do you ever feel like the sprawl of things that you are doing with freeCodeCamp, does it ever feel like some of it is a distraction? Maybe if you're time and dollars and focus was reallocated exclusively to the curriculum, you would be having measurably better output?</p>
<p>[01:55:00] <strong>Quincy:</strong> So there are diminishing returns to what you can get from focusing on different areas. I would argue that the publication and the forum and the curriculum, they are complementary to one another and they buttress one another. The publication is a way of keeping people engaged when they don't have a keyboard handy. They are just eating lunch and they just need to be able to swipe through something and read something on their phone. They're not ready to dive into a deep in-depth coding session.</p>
<p>The forum is there to help people who encounter problems or have questions while they're working through the curriculum. On every page of the critical, there’s a button that you can press that opens up a pre-populated form post with the current state of your code and everything in it and it makes it very easy to ask a question. So they complement one another.</p>
<p>Now, things that don't necessarily complement one another that we've pursued nonetheless, I would argue, would be Code Radio. freeCodeCamp has a radio station, an Internet radio station. If you go to coderadio.freeCodeCamp.org, you can listen to 24/7 music. That came out of an experiment I did on YouTube where I decided like, “Hey, let's create music that we'd like to listen to while we’re coding.”</p>
<p>We had this music producer from Los Angeles named Lawrence Yeo and he decided to help curate a big-play list of thousand – I think 1500-ish tracks of hip-hop beats, and we put those together and it was really successful. We’d have tons of people watching on YouTube.</p>
<p>Now, there was some anime clip, and one of the songs it was like a, “Haya,” or something from anime, some Japanese company that had – It was a media holding company. They probably just bought some random anime series back in the 80s and were like using their blanket copyright detection tool. They flagged it and YouTube immediately shut down the channel.</p>
<p>So we get to move it. So we’ve moved it over. We found a really awesome open source Internet radio tool called AzuraCast, and we were able to within about 48 hours get the music back up. So that's something that like we don't need a radio station, right? Coding community doesn't need its own hip-hop beats radio station, but it's really nice and it didn't take that much work. It's not a whole lot of maintenance work. We’re getting ready to launch a classical version where we just play orchestral music. So people can just put on their headphones and listen to some Bach or some Vivaldi.</p>
<p>We’re going to have a lot of people listening to that too, but that's one of the things that people use a lot. At any given time, we might have 200, 300 people concurrently listening to Code Radio. So it's something that doesn't take a whole lot of effort, but it’s used by a lot of people. So when we see opportunities like that, yeah, we can do that. I don't think is a huge distraction.</p>
<p>Elon musk runs Tesla and he runs SpaceX and he runs Solar City and he runs like the whole Hyperloop thing, right? It's difficult to see the synergies in all those, but he might be able to rattle off some synergies. What I think we’re doing is dramatically more conservative than what he is doing. Not that that’s necessarily the best example, but –</p>
<p>[01:58:17] <strong>Jeff:</strong> Yeah, I think you forgot the brain company. Yeah, I think you forgot the brain company and the tunnel company. There's a lot of stuff. I actually think this is one way in which the strong narrative of the financing of software companies has maybe been to the detriment of software innovation in some ways.</p>
<p>I’m generally a big fan of the financing and the capital structures that have enabled software companies to flourish, but one thing that I think might be a little bit outdated is the notion of rigid focus even on company – Even in companies that are like super early, like I get it, that like relentless focus can be really good for developing that first product market fit and whatnot.</p>
<p>But I also think that like this one thing I loved about Amazon, was it was just like you want to start some half-baked Amazon product, like go do it. You’re there. You’ve got access to these resources. You’ve got access to people with like crazy ideas. You want to go start like a grocery thing, or like some weird storage unit products. You can probably marshal the resources if you put your mind to it.</p>
<p>I think like if you're in your position when you're running freeCodeCamp, again, if you're trying to be inspirational, one way to be inspirational is like cultivate a sense of like we say yes to things. Should freeCodeCamp have a radio station? Why not? It doesn't cost us anything. Ting the community likes it. It makes people feel good. Yeah, why not? Then when you have that attitude of just like saying yes to kind of random stuff, you open the door to innovation, because people start to feel comfortable like, “Okay. I can express my creative ideas. Many of my creative ideas do not have a financial outcome.” They do not have an outcome of helping people learn to code faster, but we've got this quirky community. Yeah, why not spend do you know .001% of the budget or the time budget just making things a little bit more musical?</p>
<p>[02:00:37] <strong>Quincy:</strong> Yeah, and we think other experiments too because precisely of what you said. It makes the community seem more fun and more adventurous. You’re just taking low stakes bets. I mean, worst-case scenario with the Internet radio station would've been a few hours of time. Maybe dozens of hours, or hundreds of hours spent in the wrong direction. But that kind of experimentation can lead to big successes. I'd say Code Radio has been up a big success. It’s been a thousand fold return on initial effort in terms of people benefiting from it. If you took the time that’s been spent on Code Radio versus the time people spent enjoying the jolts of Code Radio.</p>
<p>Programmer playing cards is another thing that we did. So we went through – And I'm a big history buff, and I love learning the technology history especially. I went through and came up with a list of all a bunch of people who I thought were really inspiring programmers and we printed these playing cards. So every playing card has a different famous developer from history. I mean, aside from [inaudible 02:01:43], all the people are from the 20th century. Some of them were born in the 20th century and became famous in the 21st century. For example, like DHH, the creator Ruby on Rails, or Satoshi Nakamoto, people like that.</p>
<p>But it’s a great way for you to be playing cards, playing poker, playing whatever traditional card-based game you want to play. While you're sitting there waiting for someone to decide if they want to call your bluff, you can be reading the accomplishments of, for example, Linus Torvalds, or some of the more contemporary developers. So it's just a little thing that we did that we thought would be fun and we were able to do it and it was profitable in the sense that I think we spent several thousand dollar doing the design work and getting the cards printed and it paid for itself.</p>
<p>Now, wasn't like some huge smash profit center for freeCodeCamp, but it was a cool thing to do for the community and a lot of people took pictures and we go to events and people have programmer playing cards, and it's a cool thing. It’s a cool instructional tool. So freeCodeCamp doesn't shy from doing those things even though we’re fairly limited with resources. If we think that it's a small bet that has a large potential payoff.</p>
<p>[02:02:59] <strong>Jeff:</strong> You have a family and you run an extremely successful web platform with very few full-time staff that you can delegate stuff to. You get a shoestring budget. I don't want this to turn into a lifestyle advice podcast. But I do know that there are an increasing number of people who work in a similar fashion to you. I think I am one of them. I don't have a family, but I run my own weird business, that I have one person I work with full-time, Erika, and it's awesome to have some teamwork.</p>
<p>But, generally, it's kind of a lonely – I don’t want to say lonely, but there’s like Indie Hackers and there's like advice books and stuff, but this kind of business is weird and there's a growing number of people who are managing this kind of business, or working it, even just working as a contractor these days, like an online digital nomad contractor juggling two different jobs and then working on your own side projects. It's a very 21st-century existence.</p>
<p>Give me some subtle tips about how to manage this kind of work.</p>
<p>[02:04:23] <strong>Quincy:</strong> Well, I spent a lot of time talking to people through my computer, mostly through email, sometimes through Google Hangouts calls. I do a few of those every day. I don't really see many people in-person. I have friends that I talk to periodically, but it's rare that I meet up with them, like maybe once a month would be like, “Hey, I’m going to hang out with friend and we’re going to play a board game together or we’re going to go to the gym together,” right? Most of it is pretty solitary, but that's good for me, because I just like to read and I like to just go for runs and think.</p>
<p>A big chunk of my life is just me sitting there and thinking or me walking with my kid on my shoulders walking down the street, taking them to the parker or taking my daughter to school in the morning. It just gives me a nice rhythm to life to think, and I've got a very regimented routine. I always wake up the exact same time. I always go to sleep at the same time. I generally eat just a few meals over and over. So there's not a lot of variety, but that monotony that I built up, that routine, provides a very nice framework for me to explore individual things that I’m interested in without the distraction of having to make a lot of decisions throughout the day. I wear almost exactly the same clothes every day.</p>
<p>Just those little pieces of routine keep me on board. As soon as I have to get on the plane and fly somewhere, it is extremely disruptive. Probably more for me than for a lot of people, because I don't have that family. I don't have that routine to a whole new place. But that’s just me personally. I really enjoy it. I enjoy, “Okay. I've got this block of time at the end of the day. Do I want to watch an episode of The Expanse, or do I want to go for a long walk and listen to this audiobook? Do I just want to spend it –</p>
<p>[02:06:18] <strong>Jeff:</strong> Audiobook?</p>
<p>[02:06:18] <strong>Quincy:</strong> Yeah, or podcasts. That's one thing that I do to keep myself company, is I listen to a huge volume of audiobooks. Every day I listen to like The Economist podcast. I listen to the New York Times podcasts, the Washington Post Podcasts, like all the daily news podcasts just to keep on top of the world events and things like that. Then I listen to, for example, your podcast. I listen to you probably several times a week. I listen to Indie Hackers. I listen the freeCodeCamp Podcast, which increasingly is hosted by Abby. I’ll listen to my episodes too just to see how I performed on them and kind of evaluate how good I wasn't of asking questions, things like that.</p>
<p>But I just take a ton of information in my information diet. I don't have any apps on my phone. I just use my browser. I use like Firefox Quantum, or Firefox – It’s the one that isn't completely privacy-focused and I can just – I just spend a lot of time like Wikipedia, or I spend a lot of time like just Googling different things.</p>
<p>[02:07:16] <strong>Jeff:</strong> Wait. So you don’t have Audible or a podcast app on your phone?</p>
<p>[02:07:20] <strong>Quincy:</strong> So I have the built-in apps that came with the iPhone. So I do have the podcast. I just use the stock Apple podcasts app.</p>
<p>[02:07:26] <strong>Jeff:</strong> And for audiobooks?</p>
<p>[02:07:28] <strong>Quincy:</strong> For audiobooks I use Libby, which is like the library system.</p>
<p>[02:07:32] <strong>Jeff:</strong> Really?</p>
<p>[02:07:34] <strong>Quincy:</strong> Depending on which city you live, you may be able to use one of many different library apps, and basically you just check out the virtual good, if you will. There's like this for scarcity, this artificial scarcity. But like I have a whole bunch of audiobooks that I have on hold. So as soon as somebody else returns them, I can listen to them, right? But it’s clean, because I try to save money. That's one thing that we didn’t really get into, but the reason why freeCodeCamp able to grow as much as it did despite the fact that it took us two years to get tax-exempt status. Almost three years. It took us a whole lot of time before we could actually start asking for donations, things like that. I spent more than $150,000 of my own money keeping freeCodeCamp afloat during the first few years.</p>
<p>The reason I even had that money to begin with was because my wife and I are like compulsive savers and we were saving to buy a house, and it’s just pretty much every decision is made to minimize the amount of money. That's just a holder for me spending a lot of time overseas in China. I saw how frugally people are living, and I thought like, “Wow! That $60 that I was going to spend on my videogame, that somebody's – That's how they survive for the entire month.”</p>
<p>I met tons of people who were living off of $5, $10 a day and interacting with them and they were going to school. I met people who were going to go work at the state-owned enterprise, government banks and stuff like that and they were just carrying their thermos filled with tea and eating there home- prepared buns for lunch and just being extremely economical. I took a lot of inspiration in that. So I just try to save as much money as possible.</p>
<p>One of my favorite restaurants – This is going to make me sound like a crazy person, but I just go to Sam's Club, and they've got this hotdog-drink combination for like $1.50. Then I’ll get like a pretzel, and my entire lunch is like $2.50. I could sit down. They’ve got good Wi-Fi and I could just eat a hotdog and eat a pretzel and drink a diet drink and work. It costs almost nothing, right? Those little opportunities to save money, those do matter when you’re working as a teacher and you’re trying to accumulate enough money to buy a house, or as it turns out, finance an NGO.</p>
<p>[02:09:50] <strong>Jeff:</strong> Man, there’s a lot a lot in there that we could dig into further. I really wish you were in town so we could go running more often. I miss running with you. Like you, much of my mental processing and like preparation for shows really occurs when I'm like running outside, because you’re running outside and you’re seeing people, and you're seeing restaurants, and you’re seeing the world develop. You’re feeling the temperature changes. You're feeling the passage of time.</p>
<p>Every year, you feel technology, like calcifying it, some kind of essence in that passage of time. You feel the technology. You see more people on your runs interacting with technology in different ways, “Oh! There’s more people with AirPods, and look at how that – Look at how my dad uses a smartphone.” I love running as a daily routine of interacting with the world, of engaging with my surroundings. I jot down a lot of notes when I'm running, and it's all the better when I'm running with somebody else.</p>
<p>I actually started doing this. Maybe we could do this sometime, this thing called virtual runs. A term I coined, where basically like you just put on Bluetooth headphones and put your smartphone in a fanny pack, pack unless you're like a cool person with a smartwatch who doesn't need a fanny pack for their smartphone. But you can just run with like headphones in and you can have a virtual run, and it's like you're running with Quincy Larson, but you're just talking to him, and perhaps he's running, or perhaps he's washing dishes. This is what will supplant the podcast, is my theory, the virtual run, the interactive podcast. Anyway, I really miss hanging out with you, man, but we never did that often, but it was fun.</p>
<p>[02:11:47] <strong>Quincy:</strong> Yeah, now that I have kids, I never hang out with anybody very often other than my kids. Having kids is a pretty major life change.</p>
<p>[02:11:55] <strong>Jeff:</strong> Totally fair. Totally fair. Not trying to guilt trip you or anything. Just we had some great – I mean, we haven't even gotten to get into politics in this conversation.</p>
<p>[02:12:06] <strong>Quincy:</strong> Probably for the better.</p>
<p>[02:12:08] <strong>Jeff:</strong> Probably for the better. Okay, just one or two questions. How's the world going to change with broadly accessible online coding education?</p>
<p>[02:12:20] <strong>Quincy:</strong> First of all, I'm optimistic that it will mean fewer people going into debt to pay for their college education. I would not encourage anyone to go into debt even to attend like a fairly prestigious university. I’d really encourage them to go to Community College. If they have the resources, sure, go to a really solid-state school right off the bat. But see if you can save some money by going to Community College and transfer in to a better, like a bigger state school. See if you can figure out ways where you can be working while you're going to school, doing like an internship.</p>
<p>A lot of software development internships pay really well. You can potentially pay for your rent and your school with a good internship. So I'm optimistic that freeCodeCamp can provide a way that people can set themselves up to get these internships while they’re still in school. I'm also optimistic that a lot of fewer people will need to quit their job in order to transition into a new field. Certainly, more technical fields, like software engineering.</p>
<p>So on a whole, I think it will save people a lot of money and it will also give more flexibility, and that's what it's all about at the end of the day, is saving people from having to make a bunch of lifestyle compromises in order to be able to go ahead and be gainfully employed.</p>
<p>[02:13:33] <strong>Jeff:</strong> Describe the software engineering media landscape as you see it.</p>
<p>[02:13:38] <strong>Quincy:</strong> Sure. There are some awesome technical journals that are inaccessible for a lot of people. They just assume you know a whole lot of stuff. If you're tenacious, you can read them and you could just constantly open up Wikipedia or you can open up your dictionary or whatever tool and look up terms as they come out of the text at you while you're trying to read these papers. There are also a lot of great blogs that discuss a lot of technological developments. There are open platforms where pretty much anybody can publish articles, like dev.to, and Hash Note, and Hacker Noon.</p>
<p>Then there are tech publications, some of which are now paywalled increasingly, like I was looking at Wired Magazine and a bunch of other ones yesterday and I noticed that most of them have up a paywall at some point. Maybe they’ll let you see a few articles and then you’re hitting a paywall. So those are becoming less open, which is unfortunate, but I can understand that it costs a lot of money to have a newsroom and run those.</p>
<p>Then there is freeCodeCamp, which is kind of a hybrid between a traditional tech publication and a blog, and we edit everything that gets published on our publication. We are very selective about whom we let be an author. Generally, 1 in 15 people who apply will get authorship. Then they’ll be able to write articles and we edit those articles and we publicize those through our social media and also through my email blasts and LinkedIn groups, or our LinkedIn alumni association, a lot of places.</p>
<p>So it's common for people to publish articles and get tens of thousands of views on them. Not every article does that well, but a lot of them do. If you spend a lot of time writing an article, we’re going to heavily publicize it. Not just right after it gets published, but we continue to publicize things for months and years after they’ve been published if they’re still relevant and if they’re kind of more explanatory journalism that explains fundamental concepts.</p>
<p>Just to backup. I would say there are open platforms where anybody can publish anything about technology. There are technical blogs run by individuals. There are publications, like Wired, The Verge. Then there are sites like freeCodeCamp that are publications.</p>
<p>[02:16:07] <strong>Jeff:</strong> Last question. If you weren’t working on freeCodeCamp, what would you be building?</p>
<p>[02:16:14] <strong>Quincy:</strong> I'm not sure. It will probably just be another technology education tool. There's a possibility that I’d be doing English language education. I think English language education is vital and it's a market that is relatively inefficient in my humble opinion. It's a massive market. freeCodeCamp may very well eventually teach English, which sounds like a huge departure from what we do. But I think it goes hand-in-hand with helping people get 21st century jobs.</p>
<p>English is now the language of business. It's the language of science, and increasingly it's kind of becoming the language of culture. Now, there are certainly a lot of other languages that are used in culture, Japanese animation and Korean in pop music and things like that. But I think that English is still kind of the standout. If you wanted to make a movie or if you wanted to make an album or if you wanted to write a book and have a wide audience, English would be the natural choice. So I would probably – If I wasn't doing technology education, create some sort of project to run English language education.</p>
<p>[02:17:22] <strong>Jeff:</strong> Quincy, any closing thoughts about what you'd like the listeners to hear?</p>
<p>[02:17:27] <strong>Quincy:</strong> Well, I said earlier that I'm really bad about getting people to donate to freeCodeCam. So my closing statement would be if you’re listening to this and if you've gotten some value out of freeCodeCamp over the years and if you’ve listened this far into this interview, thanks for listening to me, and in Jeff's excellent questions. I would encourage you to consider donating to freeCodeCamp. You can set up a $5 dollar a month recurring donation, and that is hugely valuable to us, because it gives us the ability the project what are our budget is going to be.</p>
<p>Monthly recurring donations are by far the best. But if you just want to give a large lump sum, like Shawn Wang did or some of these other graduates from freeCodeCamp have been doing, we would welcome that too. You can use the @payitbackwards, and a lot of people will see that, and I’ll almost certainly re-tweet it as well.</p>
<p>So we would very much appreciate your support. freeCodeCamp can efficiently deploy three or four times as much capital as we have currently. I am confident that we could continue to be just as effective delivering 50 hours or more learning to people around the world per dollar. We can continue to scale up. We’re still very early days.</p>
<p>[02:18:35] <strong>Jeff:</strong> Quincy Larson, thank you so much for your generous expansive time.</p>
<p>[02:18:42] <strong>Quincy:</strong> Thank you so much for coming up with these thoughtful questions, Jeff. It’s been great talking to you.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Common SQL Interview Questions: Your Database Cheat Sheet ]]>
                </title>
                <description>
                    <![CDATA[ The following are some of the most commonly-asked SQL questions in job interviews. By understanding these, you will be better-prepared for your upcoming technical interviews. What is an inner join in SQL? This is the default type of join if no join i... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/sql-interview-questions/</link>
                <guid isPermaLink="false">66c35f95ef766eb77cd787bb</guid>
                
                    <category>
                        <![CDATA[ database ]]>
                    </category>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ SQL ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 11 Nov 2019 22:48:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/01/sql-interview.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>The following are some of the most commonly-asked SQL questions in job interviews.</p>
<p>By understanding these, you will be better-prepared for your upcoming technical interviews.</p>
<h3 id="heading-what-is-an-inner-join-in-sql">What is an inner join in SQL?</h3>
<p>This is the default type of join if no join is specified. It returns all rows in which there is at least one match in both tables.</p>
<pre><code>SELECT * FROM A x JOIN B y ON y.aId = x.Id
</code></pre><h3 id="heading-what-is-a-left-join-in-sql">What is a left join in SQL?</h3>
<p>A left join returns all rows from the left table, and the matched rows from the right table. Rows in the left table will be returned even if there was no match in the right table. The rows from the left table with no match in the right table will have  <code>null</code>  for right table values.</p>
<pre><code>SELECT * FROM A x LEFT JOIN B y ON y.aId = x.Id
</code></pre><h3 id="heading-what-is-a-right-join-in-sql">What is a right join in SQL?</h3>
<p>A right join returns all rows from the right table, and the matched rows from the left table. Opposite of a left join, this will return all rows from the right table even where there is no match in the left table. Rows in the right table that have no match in the left table will have  <code>null</code>  values for left table columns.</p>
<pre><code>SELECT * FROM A x RIGHT JOIN B y ON y.aId = x.Id
</code></pre><h3 id="heading-what-is-a-full-join-in-sql">What is a full join in SQL?</h3>
<p>A full join returns all rows for which there is a match in either of the tables. So if there are rows in the left table that do not have matches in the right table, those will be included. As well as if there are rows in the right table that do not have matches in the left table, those will be included.</p>
<pre><code>SELECT Customers.CustomerName, Orders.OrderID
FROM Customers
FULL OUTER JOIN Orders
ON Customers.CustomerID=Orders.CustomerID
ORDER BY Customers.CustomerName
</code></pre><h3 id="heading-what-is-the-result-of-the-following-command">What is the result of the following command?</h3>
<pre><code>  DROP VIEW view_name
</code></pre><p>Here it’ll be an error because we can’t perform a DML operation on a view.</p>
<h3 id="heading-can-we-perform-a-rollback-after-using-alter-command">Can we perform a rollback after using ALTER command?</h3>
<p>No, because ALTER is a DDL command and Oracle server performs an automatic COMMIT when the DDL statements are executed.</p>
<h3 id="heading-which-is-the-only-constraint-that-enforces-rules-at-column-level">Which is the only constraint that enforces rules at column level?</h3>
<p>NOT NULL is the only constraint that works at the column level.</p>
<h3 id="heading-what-are-the-pseudocolumns-in-sql-give-some-examples">What are the pseudocolumns in SQL? Give some examples?</h3>
<p>A pseudocolumn is a function which returns a system generated value. The reason it is known as so because a pseudocolumn is an Oracle assigned value used in the same context as an Oracle database column but not stored on disk.</p>
<pre><code>    ROWNUM, ROWID, USER, CURRVAL, NEXTVAL etc.
</code></pre><h3 id="heading-create-a-user-my723acct-with-password-kmd26pt-use-the-user-data-and-temporary-data-tablespaces-provided-by-po8-and-provide-to-this-user-10m-of-storage-space-in-user-data-and-5m-of-storage-space-in-temporarydata">Create a user my723acct with password kmd26pt. Use the user <em>data and temporary data tablespaces provided by PO8 and provide to this user 10M of storage space in user</em> data and 5M of storage space in temporary_data.</h3>
<pre><code>    CREATE USER my723acct IDENTIFIED BY kmd26pt
    DEFAULT TABLESPACE user_data
    TEMPORARY TABLESPACE temporary_data
    QUOTA <span class="hljs-number">10</span>M on user_data QUOTA <span class="hljs-number">5</span>M on temporary_data
</code></pre><h3 id="heading-create-the-role-role-tables-andviews">Create the role role <em>tables</em> and_views.</h3>
<pre><code>    CREATE ROLE role_tables_and_views
</code></pre><h3 id="heading-grant-to-the-role-of-the-previous-question-the-privileges-to-connect-to-the-database-and-the-privileges-to-create-tables-and-views">Grant to the role of the previous question the privileges to connect to the database and the privileges to create tables and views.</h3>
<p>The privilege to connect to the database is CREATE SESSION The privilege to create table is CREATE TABLE The privilege to create view is CREATE VIEW</p>
<pre><code>    GRANT Create session, create table, create view TO role_tables_and_views
</code></pre><h3 id="heading-grant-the-previous-role-in-the-question-to-the-users-anny-and-rita">Grant the previous role in the question to the users anny and rita</h3>
<pre><code>    GRANT role_tables_and_views TO anny, rita
</code></pre><h3 id="heading-create-a-user-my723acct-with-password-kmd26pt-use-the-user-data-and-temporary-data-tablespaces-provided-by-po8-and-provide-to-this-user-10m-of-storage-space-in-user-data-and-5m-of-storage-space-in-temporarydata-1">Create a user my723acct with password kmd26pt. Use the user <em>data and temporary data tablespaces provided by PO8 and provide to this user 10M of storage space in user</em> data and 5M of storage space in temporary_data.</h3>
<pre><code>    CREATE USER my723acct IDENTIFIED BY kmd26pt
    DEFAULT TABLESPACE user_data
    TEMPORARY TABLESPACE temporary_data
    QUOTA <span class="hljs-number">10</span>M on user_data QUOTA <span class="hljs-number">5</span>M on temporary_data
</code></pre><h3 id="heading-create-the-role-role-tables-andviews-1">Create the role role <em>tables</em> and_views.</h3>
<pre><code>    CREATE ROLE role_tables_and_views
</code></pre><h3 id="heading-grant-to-the-role-of-the-previous-question-the-privileges-to-connect-to-the-database-and-the-privileges-to-create-tables-and-views-1">Grant to the role of the previous question the privileges to connect to the database and the privileges to create tables and views.</h3>
<p>The privilege to connect to the database is CREATE SESSION The privilege to create table is CREATE TABLE The privilege to create view is CREATE VIEW</p>
<pre><code>    GRANT Create session, create table, create view TO role_tables_and_views
</code></pre><h3 id="heading-grant-the-previous-role-in-the-question-to-the-users-anny-and-rita-1">Grant the previous role in the question to the users anny and rita.</h3>
<pre><code>    GRANT role_tables_and_views TO anny, rita
</code></pre><h3 id="heading-write-a-command-to-change-the-password-of-the-user-rita-from-abcd-to-dfgh">Write a command to change the password of the user rita from abcd to dfgh.</h3>
<pre><code>    ALTER USER rita IDENTIFIED BY dfgh
</code></pre><p>The users rita and anny do not have SELECT privileges on the table INVENTORY that was created by SCOTT. Write a command to allow SCOTT to grant the users SELECT priviliges on these tables.</p>
<pre><code>    GRANT select ON inventory TO rita, anny
</code></pre><p>User rita has been transferred and no longer needs the privilege that was granted to her through the role role tables and_views. Write a command to remove her from her previous given privileges except that she still could connect to the database.</p>
<pre><code>    REVOKE select ON scott.inventory FROM rita
    REVOKE create table, create view FROM rita
</code></pre><p>The user rita who was transferred is now moving to another company. Since the objects that she created is of no longer use, write a commmand to remove this user and all her objects.</p>
<p>Here CASCADE option is necessary to remove all the objects of the user in the database.</p>
<pre><code>   DROP USER rita CASCADE

### User rita has been transferred and no longer needs the privilege that was granted to her through the role role_tables_and_views. Write a command to remove her <span class="hljs-keyword">from</span> her previous given priviliges except that she still could connect to the database.
<span class="hljs-string">``</span><span class="hljs-string">` sql    
    REVOKE select ON scott.inventory FROM rita
    REVOKE create table, create view FROM rita</span>
</code></pre><p>The user rita who was transferred is now moving to another company. Since the objects that she created is of no longer use, write a commmand to remove this user and all her objects.</p>
<p>Here CASCADE option is necessary to remove all the objects of the user in the database.</p>
<pre><code>   DROP USER rita CASCADE
</code></pre><h3 id="heading-write-sql-query-to-find-the-nth-highest-salary-from-table">Write SQL query to find the nth highest salary from table.</h3>
<pre><code>   SELECT TOP <span class="hljs-number">1</span> Salary
   FROM (
      SELECT DISTINCT TOP N Salary
      FROM Employee
      ORDER BY Salary DESC
      )
    ORDER BY Salary ASC
</code></pre> ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Common SQL Interview Questions for Amazon, Apple, Google ]]>
                </title>
                <description>
                    <![CDATA[ SQL is used in a wide variety of programming jobs. It's important to be familiar with SQL if you are going to be interviewing soon for a software position. This is especially true if you are going to interview at a top tech company such as Amazon, Ap... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/common-sql-interview-questions/</link>
                <guid isPermaLink="false">66b20155a8b92c932923641f</guid>
                
                    <category>
                        <![CDATA[ interview ]]>
                    </category>
                
                    <category>
                        <![CDATA[ SQL ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Beau Carnes ]]>
                </dc:creator>
                <pubDate>Sat, 02 Nov 2019 16:57:00 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9faf740569d1a4ca43fc.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>SQL is used in a wide variety of programming jobs. It's important to be familiar with SQL if you are going to be interviewing soon for a software position. This is especially true if you are going to interview at a top tech company such as Amazon, Apple, or Google. </p>
<p>This guide will cover basic SQL syntax as a refresher and then list some common SQL interview questions. The answers for all questions are given and you can use this information to study for your programming interview.</p>
<h2 id="heading-basic-sql-syntax-example"><strong>Basic SQL Syntax Example</strong></h2>
<p>SQL is an international standard (ISO), but you will find some differences between implementations. This guide uses MySQL as an example because it's the most popular implementation of SQL. </p>
<h3 id="heading-how-to-use-a-specific-database"><strong>How to use a specific database</strong></h3>
<p>Here is the SQL command used to select the database containing the tables for your SQL statements:</p>
<pre><code class="lang-sql"><span class="hljs-keyword">USE</span> fcc_sql_guides_database;
</code></pre>
<h3 id="heading-select-and-from-clauses"><strong>SELECT and FROM clauses</strong></h3>
<p>Use SELECT to determine which columns of the data you want to show in the results. There are also options you can use to show data that is not a table column.</p>
<p>The following example shows two columns selected from the “student” table, and two calculated columns. The first of the calculated columns is a meaningless number, and the other is the system date.</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> studentID, FullName, <span class="hljs-number">3</span>+<span class="hljs-number">2</span> <span class="hljs-keyword">AS</span> five, <span class="hljs-keyword">now</span>() <span class="hljs-keyword">AS</span> currentDate <span class="hljs-keyword">FROM</span> student;
</code></pre>
<p><img src="https://freecodecamp.s3.amazonaws.com/guide-sql-images/syntax01.JPG" alt="image-1" width="767" height="241" loading="lazy"></p>
<h3 id="heading-where-clause"><strong>WHERE clause</strong></h3>
<p>The WHERE clause specifies a condition while getting data. The WHERE clause is used to limit the number of rows returned. It's often used in a SELECT statement but can also be used in other statements such as UPDATE and DELETE.</p>
<p>Here is the basic syntax of the WHERE clause:</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> column1, column2
<span class="hljs-keyword">FROM</span> table_name
<span class="hljs-keyword">WHERE</span> [condition]
</code></pre>
<p>The condition in a WHERE clause can include logical operators like &gt;, &lt;, =, LIKE, NOT, AND, OR.</p>
<p>Here is an example of a SQL statment using the WHERE clause. It specifies that if any of the students have certain SAT scores (1000, 1400), they will not be presented:</p>
<pre><code>SELECT studentID, FullName, sat_score, recordUpdated
FROM student
WHERE (studentID BETWEEN <span class="hljs-number">1</span> AND <span class="hljs-number">5</span>
    OR studentID = <span class="hljs-number">8</span>
    OR FullName LIKE <span class="hljs-string">'%Maximo%'</span>)
    AND sat_score NOT IN (<span class="hljs-number">1000</span>, <span class="hljs-number">1400</span>);
</code></pre><p><img src="https://freecodecamp.s3.amazonaws.com/guide-sql-images/syntax02.JPG" alt="image-1" width="414" height="147" loading="lazy"></p>
<h3 id="heading-order-by-asc-desc"><strong>ORDER BY (ASC, DESC)</strong></h3>
<p>ORDER BY gives us a way to sort the result set by one or more of the items in the SELECT section.</p>
<p>Here is the same list as above, but sorted by the student's Full Name. The default sort order is ascending (ASC), but to sort in the opposite order (descending) you use DESC, as in the example below:</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> studentID, FullName, sat_score
<span class="hljs-keyword">FROM</span> student
<span class="hljs-keyword">WHERE</span> (studentID <span class="hljs-keyword">BETWEEN</span> <span class="hljs-number">1</span> <span class="hljs-keyword">AND</span> <span class="hljs-number">5</span>
    <span class="hljs-keyword">OR</span> studentID = <span class="hljs-number">8</span>
    <span class="hljs-keyword">OR</span> FullName <span class="hljs-keyword">LIKE</span> <span class="hljs-string">'%Maximo%'</span>)
    <span class="hljs-keyword">AND</span> sat_score <span class="hljs-keyword">NOT</span> <span class="hljs-keyword">IN</span> (<span class="hljs-number">1000</span>, <span class="hljs-number">1400</span>)
<span class="hljs-keyword">ORDER</span> <span class="hljs-keyword">BY</span> FullName <span class="hljs-keyword">DESC</span>;
</code></pre>
<p><img src="https://freecodecamp.s3.amazonaws.com/guide-sql-images/syntax03.JPG" alt="image-1" width="302" height="144" loading="lazy"></p>
<h3 id="heading-group-by-and-having"><strong>GROUP BY and HAVING</strong></h3>
<p>GROUP BY gives us a way to combine rows and aggregate data. The HAVING clause is like the above WHERE clause, except that it acts on the grouped data.</p>
<p>The SQL statement below answers the question: “Which candidates received the largest number of contributions (ordered by count (*)) in 2016, but only those who had more than 80 contributions?”</p>
<p>Ordering this data set in a descending (DESC) order places the candidates with the largest number of contributions at the top of the list.</p>
<pre><code>SELECT Candidate, Election_year, SUM(Total_$), COUNT(*)
FROM combined_party_data
WHERE Election_year = <span class="hljs-number">2016</span>
GROUP BY Candidate, Election_year
HAVING count(*) &gt; <span class="hljs-number">80</span>
ORDER BY count(*) DESC;
</code></pre><p><img src="https://freecodecamp.s3.amazonaws.com/guide-sql-images/syntax04.JPG" alt="image-1" width="573" height="176" loading="lazy"></p>
<h2 id="heading-common-sql-interview-questions">Common SQL Interview Questions</h2>
<h3 id="heading-what-is-an-inner-join-in-sql"><strong>What is an inner join in SQL?</strong></h3>
<p>This is the default type of join if no join is specified. It returns all rows in which there is at least one match in both tables.</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> A x <span class="hljs-keyword">JOIN</span> B y <span class="hljs-keyword">ON</span> y.aId = x.Id
</code></pre>
<h3 id="heading-what-is-a-left-join-in-sql"><strong>What is a left join in SQL?</strong></h3>
<p>A left join returns all rows from the left table, and the matched rows from the right table. Rows in the left table will be returned even if there was no match in the right table. The rows from the left table with no match in the right table will have <code>null</code> for right table values.</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> A x <span class="hljs-keyword">LEFT</span> <span class="hljs-keyword">JOIN</span> B y <span class="hljs-keyword">ON</span> y.aId = x.Id
</code></pre>
<h3 id="heading-what-is-a-right-join-in-sql"><strong>What is a right join in SQL?</strong></h3>
<p>A right join returns all rows from the right table, and the matched rows from the left table. Opposite of a left join, this will return all rows from the right table even where there is no match in the left table. Rows in the right table that have no match in the left table will have <code>null</code> values for left table columns.</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> A x <span class="hljs-keyword">RIGHT</span> <span class="hljs-keyword">JOIN</span> B y <span class="hljs-keyword">ON</span> y.aId = x.Id
</code></pre>
<h3 id="heading-what-is-a-full-join-or-full-outer-join-in-sql"><strong>What is a full join or full outer join in SQL?</strong></h3>
<p>A full outer join and a full join are the same thing. The full outer join or full join returns all rows from both tables, matching up the rows wherever a match can be made and placing NULLs in the places where no matching row exists.</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> Customers.CustomerName, Orders.OrderID
<span class="hljs-keyword">FROM</span> Customers
<span class="hljs-keyword">FULL</span> <span class="hljs-keyword">OUTER</span> <span class="hljs-keyword">JOIN</span> Orders
<span class="hljs-keyword">ON</span> Customers.CustomerID=Orders.CustomerID
<span class="hljs-keyword">ORDER</span> <span class="hljs-keyword">BY</span> Customers.CustomerName
</code></pre>
<h3 id="heading-what-is-the-result-of-the-following-command"><strong>What is the result of the following command?</strong></h3>
<pre><code class="lang-sql"><span class="hljs-keyword">DROP</span> <span class="hljs-keyword">VIEW</span> view_name
</code></pre>
<p>This will result in an error because you can’t perform a DML operation on a view. A DML operation is any operation that manipulates the data such as DROP, INSERT, UPDATE, and DELETE.</p>
<h3 id="heading-can-we-perform-a-rollback-after-using-alter-command"><strong>Can we perform a rollback after using ALTER command?</strong></h3>
<p>No, because ALTER is a DDL command and Oracle server performs an automatic COMMIT when the DDL statements are executed. DDL statements define data structures such as <code>CREATE table</code> and <code>ALTER table</code>.</p>
<h3 id="heading-which-is-the-only-constraint-that-enforces-rules-at-column-level"><strong>Which is the only constraint that enforces rules at column level?</strong></h3>
<p>NOT NULL is the only constraint that works at the column level.</p>
<h3 id="heading-what-are-the-pseudocolumns-in-sql-give-some-examples"><strong>What are the pseudocolumns in SQL? Give some examples?</strong></h3>
<p>A pseudocolumn behaves like a column, but is not actually stored in the table because it is all generated values. The values of a pseudocolumn can be selected but they cannot be inserted, updated, or deleted. </p>
<pre><code>ROWNUM, ROWID, USER, CURRVAL, NEXTVAL etc.
</code></pre><h3 id="heading-create-a-user-my723acct-with-password-kmd26pt-use-the-userdata-and-temporary-data-tablespaces-provided-by-po8-and-provide-to-this-user-10m-of-storage-space-in-userdata-and-5m-of-storage-space-in-temporarydata">Create a user "my723acct" with password "kmd26pt". Use the "user_data" and temporary data tablespaces provided by PO8 and provide to this user 10M of storage space in "user_data" and 5M of storage space in "temporary_data".</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">USER</span> my723acct <span class="hljs-keyword">IDENTIFIED</span> <span class="hljs-keyword">BY</span> kmd26pt
<span class="hljs-keyword">DEFAULT</span> <span class="hljs-keyword">TABLESPACE</span> <span class="hljs-keyword">user_data</span>
<span class="hljs-keyword">TEMPORARY</span> <span class="hljs-keyword">TABLESPACE</span> temporary_data
<span class="hljs-keyword">QUOTA</span> <span class="hljs-number">10</span>M <span class="hljs-keyword">on</span> <span class="hljs-keyword">user_data</span> <span class="hljs-keyword">QUOTA</span> <span class="hljs-number">5</span>M <span class="hljs-keyword">on</span> temporary_data
</code></pre>
<h3 id="heading-create-the-role-roletablesandviews"><strong>Create the role</strong> _role_tables_and<em>views</em><strong>.</strong></h3>
<pre><code class="lang-sql"><span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">ROLE</span> role_tables_and_views
</code></pre>
<h3 id="heading-grant-to-the-role-of-the-previous-question-the-privileges-to-connect-to-the-database-and-the-privileges-to-create-tables-and-views"><strong>Grant to the role of the previous question the privileges to connect to the database and the privileges to create tables and views.</strong></h3>
<p>The privilege to connect to the database is CREATE SESSION The privilege to create table is CREATE TABLE The privilege to create view is CREATE VIEW</p>
<pre><code class="lang-sql">    <span class="hljs-keyword">GRANT</span> <span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">SESSION</span>, <span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">TABLE</span>, <span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">VIEW</span> <span class="hljs-keyword">TO</span> role_tables_and_views
</code></pre>
<h3 id="heading-grant-the-previous-role-in-the-question-to-the-users-anny-and-rita"><strong>Grant the previous role in the question to the users <em>anny</em> and <em>rita</em>.</strong></h3>
<pre><code class="lang-sql">    <span class="hljs-keyword">GRANT</span> role_tables_and_views <span class="hljs-keyword">TO</span> anny, rita
</code></pre>
<h3 id="heading-write-a-command-to-change-the-password-of-the-user-rita-from-abcd-to-dfgh"><strong>Write a command to change the password of the user <em>rita</em> from "abcd" to "dfgh"</strong></h3>
<pre><code class="lang-sql">    <span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">USER</span> rita <span class="hljs-keyword">IDENTIFIED</span> <span class="hljs-keyword">BY</span> dfgh
</code></pre>
<h3 id="heading-the-users-rita-and-anny-do-not-have-select-privileges-on-the-table-inventory-that-was-created-by-scott-write-a-command-to-allow-scott-to-grant-the-users-select-privileges-on-theses-tables">The users <em>rita</em> and <em>anny</em> do not have SELECT privileges on the table INVENTORY that was created by <em>scott</em>. Write a command to allow <em>scott</em> to grant the users SELECT privileges on theses  tables.</h3>
<pre><code class="lang-sql">    <span class="hljs-keyword">GRANT</span> <span class="hljs-keyword">select</span> <span class="hljs-keyword">ON</span> inventory <span class="hljs-keyword">TO</span> rita, anny
</code></pre>
<h3 id="heading-user-rita-has-been-transferred-and-no-longer-needs-the-privilege-that-was-granted-to-her-through-the-role-roletablesandviews-write-a-command-to-remove-her-from-her-previously-given-privileges-she-should-still-be-able-to-connect-to-the-database"><strong>User</strong> <em><strong>rita</strong></em> <strong>has been transferred and no longer needs the privilege that was granted to her through the role</strong> _role_tables_and<em>views</em>. Write a command to remove her from her previously given privileges. She should still be able to connect to the database.</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">REVOKE</span> <span class="hljs-keyword">select</span> <span class="hljs-keyword">ON</span> scott.inventory <span class="hljs-keyword">FROM</span> rita
<span class="hljs-keyword">REVOKE</span> <span class="hljs-keyword">create</span> <span class="hljs-keyword">table</span>, <span class="hljs-keyword">create</span> <span class="hljs-keyword">view</span> <span class="hljs-keyword">FROM</span> rita
</code></pre>
<h3 id="heading-the-user-rita-who-was-transferred-is-now-moving-to-another-company-since-the-objects-she-created-are-no-longer-used-write-a-command-to-remove-this-user-and-all-her-objects"><strong>The user <em>rita</em> who was transferred is now moving to another company. Since the objects she created are no longer used, write a command to remove this user and all her objects.</strong></h3>
<p>The CASCADE option is necessary to remove all the objects of the user in the database.</p>
<pre><code class="lang-sql"><span class="hljs-keyword">DROP</span> <span class="hljs-keyword">USER</span> rita <span class="hljs-keyword">CASCADE</span>
</code></pre>
<h3 id="heading-write-an-sql-query-to-find-the-nth-highest-salary-from-the-employee-table"><strong>Write an SQL query to find the nth highest "Salary" from the "Employee" table.</strong></h3>
<pre><code class="lang-sql">   <span class="hljs-keyword">SELECT</span> TOP <span class="hljs-number">1</span> Salary
   <span class="hljs-keyword">FROM</span> (
      <span class="hljs-keyword">SELECT</span> <span class="hljs-keyword">DISTINCT</span> TOP N Salary
      <span class="hljs-keyword">FROM</span> Employee
      <span class="hljs-keyword">ORDER</span> <span class="hljs-keyword">BY</span> Salary <span class="hljs-keyword">DESC</span>
      )
    <span class="hljs-keyword">ORDER</span> <span class="hljs-keyword">BY</span> Salary <span class="hljs-keyword">ASC</span>
</code></pre>
<h2 id="heading-conclusion">Conclusion</h2>
<p>If you think you can answer all these questions, you may be ready for your interview. Good luck!</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
