<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jaimin Bariya</title>
    <description>The latest articles on DEV Community by Jaimin Bariya (@jaiminbariya).</description>
    <link>https://dev.to/jaiminbariya</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1763695%2Fb9acc50b-20e7-4d58-a69e-e769d20959e4.png</url>
      <title>DEV Community: Jaimin Bariya</title>
      <link>https://dev.to/jaiminbariya</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jaiminbariya"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>Jaimin Bariya</dc:creator>
      <pubDate>Thu, 08 May 2025 02:13:12 +0000</pubDate>
      <link>https://dev.to/jaiminbariya/-b06</link>
      <guid>https://dev.to/jaiminbariya/-b06</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/copilotkit/add-an-mcp-client-to-any-react-app-in-under-30-minutes-55gm" class="crayons-story__hidden-navigation-link"&gt;Turn Any React App into an MCP Client in Under 10 Minutes&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;
          &lt;a class="crayons-logo crayons-logo--l" href="/copilotkit"&gt;
            &lt;img alt="CopilotKit logo" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F7820%2F85b7e418-7abd-4fb5-8be6-69eb48a30e53.gif" class="crayons-logo__image"&gt;
          &lt;/a&gt;

          &lt;a href="/anmolbaranwal" class="crayons-avatar  crayons-avatar--s absolute -right-2 -bottom-2 border-solid border-2 border-base-inverted  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F950976%2F69363f37-b7c5-4f1e-a2fe-29b4e4e33e92.png" alt="anmolbaranwal profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/anmolbaranwal" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Anmol Baranwal
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Anmol Baranwal
                &lt;a href="/++"&gt;&lt;img alt="Subscriber" class="subscription-icon" src="https://assets.dev.to/assets/subscription-icon-805dfa7ac7dd660f07ed8d654877270825b07a92a03841aa99a1093bd00431b2.png"&gt;&lt;/a&gt;
              
              &lt;div id="story-author-preview-content-2417762" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/anmolbaranwal" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F950976%2F69363f37-b7c5-4f1e-a2fe-29b4e4e33e92.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Anmol Baranwal&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

            &lt;span&gt;
              &lt;span class="crayons-story__tertiary fw-normal"&gt; for &lt;/span&gt;&lt;a href="/copilotkit" class="crayons-story__secondary fw-medium"&gt;CopilotKit&lt;/a&gt;
            &lt;/span&gt;
          &lt;/div&gt;
          &lt;a href="https://dev.to/copilotkit/add-an-mcp-client-to-any-react-app-in-under-30-minutes-55gm" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;May 1 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/copilotkit/add-an-mcp-client-to-any-react-app-in-under-30-minutes-55gm" id="article-link-2417762"&gt;
          Turn Any React App into an MCP Client in Under 10 Minutes
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/programming"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;programming&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/react"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;react&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/copilotkit/add-an-mcp-client-to-any-react-app-in-under-30-minutes-55gm" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/raised-hands-74b2099fd66a39f2d7eed9305ee0f4553df0eb7b4f11b01b6b1b499973048fe5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/fire-f60e7a582391810302117f987b22a8ef04a2fe0df7e3258a5f49332df1cec71e.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;267&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/copilotkit/add-an-mcp-client-to-any-react-app-in-under-30-minutes-55gm#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              27&lt;span class="hidden s:inline"&gt; comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            22 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>webdev</category>
      <category>programming</category>
      <category>ai</category>
      <category>react</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Jaimin Bariya</dc:creator>
      <pubDate>Thu, 10 Apr 2025 03:43:55 +0000</pubDate>
      <link>https://dev.to/jaiminbariya/-mi8</link>
      <guid>https://dev.to/jaiminbariya/-mi8</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/karmpatel/git-branching-strategies-a-comprehensive-guide-24kh" class="crayons-story__hidden-navigation-link"&gt;Git Branching Strategies: A Comprehensive Guide&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/karmpatel" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F962481%2Fe48c7733-ade2-4678-ac7e-4f439f4275c6.jpg" alt="karmpatel profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/karmpatel" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Karm Patel
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Karm Patel
                
              
              &lt;div id="story-author-preview-content-2333328" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/karmpatel" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F962481%2Fe48c7733-ade2-4678-ac7e-4f439f4275c6.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Karm Patel&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/karmpatel/git-branching-strategies-a-comprehensive-guide-24kh" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Mar 16 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/karmpatel/git-branching-strategies-a-comprehensive-guide-24kh" id="article-link-2333328"&gt;
          Git Branching Strategies: A Comprehensive Guide
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/git"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;git&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/github"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;github&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/githunt"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;githunt&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/twitter"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;twitter&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/karmpatel/git-branching-strategies-a-comprehensive-guide-24kh" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/raised-hands-74b2099fd66a39f2d7eed9305ee0f4553df0eb7b4f11b01b6b1b499973048fe5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;129&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/karmpatel/git-branching-strategies-a-comprehensive-guide-24kh#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              7&lt;span class="hidden s:inline"&gt; comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            6 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>git</category>
      <category>github</category>
      <category>githunt</category>
      <category>twitter</category>
    </item>
    <item>
      <title>AI ML DL DS Robotics Automation differences ???</title>
      <dc:creator>Jaimin Bariya</dc:creator>
      <pubDate>Wed, 29 Jan 2025 12:33:20 +0000</pubDate>
      <link>https://dev.to/jaiminbariya/ai-ml-dl-ds-robotics-automation--i4</link>
      <guid>https://dev.to/jaiminbariya/ai-ml-dl-ds-robotics-automation--i4</guid>
      <description>&lt;p&gt;Let's come to the point... (Introduction later 🤘)&lt;/p&gt;

&lt;p&gt;What makes things different? If we learn what is different in all terms that come under one big umbrella, which is AI, then it will be easy for us to learn more in these fields. &lt;/p&gt;

&lt;p&gt;Let's do it. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Listen, guys, I am not going to discuss the definition. This is totally raw stuff, okay?!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  1. AI [Artificial Intelligence]
&lt;/h3&gt;

&lt;p&gt;The broadest umbrella that covers everything. It's about creating machines that can &lt;strong&gt;mimic human intelligence.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
But remember, it is not just about mimicking human intelligence but also making &lt;strong&gt;decisions autonomously&lt;/strong&gt; and &lt;strong&gt;learning from interaction.&lt;/strong&gt;&lt;br&gt;
Includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Machine Learning (ML)&lt;/li&gt;
&lt;li&gt;Deep Learning (DL)&lt;/li&gt;
&lt;li&gt;Natural Language Processing (NLP)&lt;/li&gt;
&lt;li&gt;Computer Vision (CV)&lt;/li&gt;
&lt;li&gt;Robotics &amp;amp; Automation&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  2. ML [Machine Learning]
&lt;/h3&gt;

&lt;p&gt;ML is the subset of AI, one &lt;strong&gt;machine learns from past data&lt;/strong&gt; to &lt;strong&gt;predict future&lt;/strong&gt; outcomes &lt;strong&gt;without being explicitly programmed&lt;/strong&gt; for &lt;strong&gt;specific task.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Predicting house prices based on features like size and location.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Includes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Supervised Learning: Predict house prices&lt;/li&gt;
&lt;li&gt;Unsupervised Learning: Customer clustering&lt;/li&gt;
&lt;li&gt;Reinforcement Learning: Training an AI agent for games
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Job Roles:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ML Engineer: Builds models, optimizes algorithms&lt;/li&gt;
&lt;li&gt;ML Developer: Focuses on integrating ML models into products&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  3. DL [Deep Learning]
&lt;/h3&gt;

&lt;p&gt;A subset of ML, the Same things learn from the past data and try to predict the future, but &lt;strong&gt;DL has more power&lt;/strong&gt; like [ML + Some energy booster] 😅.   &lt;/p&gt;

&lt;p&gt;Using a &lt;strong&gt;Neural Network&lt;/strong&gt; [Layer of the network where each layer thinks - so more layers it thinks more], Machine &lt;strong&gt;solves complex problems&lt;/strong&gt; like generative AI, and Natural Language Processing [NLP - talk and understand human language].   &lt;/p&gt;

&lt;p&gt;One &lt;strong&gt;big difference&lt;/strong&gt; is in ML we choose features like size, color, etc from input, there are like parameters that we use to train the ML Model that is called &lt;strong&gt;feature engineering&lt;/strong&gt;,   &lt;/p&gt;

&lt;p&gt;But in DL this is done &lt;strong&gt;automatically&lt;/strong&gt; means feature selection does automatically that's why it can be called a*&lt;em&gt;utomatic feature extraction (instead of "feature engineering").&lt;/em&gt;*  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Includes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ANNs: General neural networks&lt;/li&gt;
&lt;li&gt;CNNs: Image recognition&lt;/li&gt;
&lt;li&gt;RNNs: Time-series forecasting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Job Roles:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI Developer (DL Focus): Develops complex AI systems&lt;/li&gt;
&lt;li&gt;Computer Vision Engineer: Focus on image-related models&lt;/li&gt;
&lt;li&gt;NLP Engineer: Language models (chatbots, translation)&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  4. DS [Data Science]
&lt;/h3&gt;

&lt;p&gt;Focuses on data analysis, pattern discovery, and storytelling using data.  &lt;/p&gt;

&lt;p&gt;Mainly focus on the data part, which includes data analysis, finding insights, and storytelling using data and facts, in short, find something helpful in data with patterns to take any decision that helps.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key outcome:&lt;/strong&gt; Data-driven decision-making.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Includes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data Cleaning &amp;amp; Preprocessing&lt;/li&gt;
&lt;li&gt;Visualization &amp;amp; Reporting&lt;/li&gt;
&lt;li&gt;Predictive Analytics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Job Roles:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data Scientist: Builds insights and predictive models&lt;/li&gt;
&lt;li&gt;Data Analyst: Analyzes and visualizes data &lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  5. Robotics
&lt;/h3&gt;

&lt;p&gt;Building physical machines with sensors, AI, and automation logic.  &lt;/p&gt;

&lt;p&gt;Robotics doesn't always need AI. Basic robots can be pre-programmed without AI. But when AI is integrated, they become intelligent and adaptable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Boston Dynamics' robots vs simple pick-and-place industrial robots.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Includes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Self-driving cars&lt;/li&gt;
&lt;li&gt;Robot assistants (e.g., industrial robots)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Job Roles:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Robotics Engineer: Develops hardware + software&lt;/li&gt;
&lt;li&gt;AI Robotics Specialist: Integrates AI for intelligent behavior&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  6. Automation
&lt;/h3&gt;

&lt;p&gt;Using software/hardware to perform tasks without human intervention.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Software Automation:&lt;/strong&gt;&lt;br&gt;
Automates virtual tasks (RPA for data entry).  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hardware Automation:&lt;/strong&gt;&lt;br&gt;
Automates physical tasks (like robotic arms in factories or smart home systems).  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Includes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RPA (Robotic Process Automation): Automating repetitive business tasks&lt;/li&gt;
&lt;li&gt;AI Automation: Smart decision-making systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Job Roles:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automation Engineer: Focus on automation solutions &lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  7. Data Engineering &amp;amp; ML Ops
&lt;/h3&gt;

&lt;p&gt;Ensures data pipelines and model deployments are smooth.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Engineering:&lt;/strong&gt; Building pipelines to process and move data efficiently for analytics or AI models.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ML Ops:&lt;/strong&gt; Deploying, scaling, and maintaining ML models in production environments.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Includes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cloud infrastructure (AWS, GCP)&lt;/li&gt;
&lt;li&gt;CI/CD for ML models&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Job Roles:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ML Ops Engineer: Focuses on deploying AI/ML systems&lt;/li&gt;
&lt;li&gt;Data Engineer: Builds pipelines for large-scale data&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  &lt;strong&gt;Summary Table&lt;/strong&gt; 🧠
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Field&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Focus Area&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Job Roles&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AI&lt;/td&gt;
&lt;td&gt;Broad decision-making&lt;/td&gt;
&lt;td&gt;AI Developer, AI Engineer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ML&lt;/td&gt;
&lt;td&gt;Learning from data&lt;/td&gt;
&lt;td&gt;ML Engineer, ML Developer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DL&lt;/td&gt;
&lt;td&gt;Neural networks&lt;/td&gt;
&lt;td&gt;DL Specialist, NLP Engineer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data Science&lt;/td&gt;
&lt;td&gt;Analytics &amp;amp; predictions&lt;/td&gt;
&lt;td&gt;Data Scientist, Analyst&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Robotics&lt;/td&gt;
&lt;td&gt;Smart machines&lt;/td&gt;
&lt;td&gt;Robotics Engineer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Automation&lt;/td&gt;
&lt;td&gt;Task automation&lt;/td&gt;
&lt;td&gt;Automation Engineer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data Engineering&lt;/td&gt;
&lt;td&gt;Data pipelines&lt;/td&gt;
&lt;td&gt;Data Engineer, ML Ops&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;



&lt;p&gt;Okay, a little bit of time for my introduction, My name is &lt;a href="https://github.com/jaimin-bariya" rel="noopener noreferrer"&gt;Jaimin Bariya&lt;/a&gt;, and if you find this article helpful plz give all likes (all 5), and throw one comment (anything like nice, super, greetings, etc... ), if it is possible then share with your one friend. &lt;/p&gt;

&lt;p&gt;Okay Bye Bye, See you in the next article and try to simplify more hard things 😅. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Checkout my previous articles, if you like AI, you will like them&lt;/p&gt;
&lt;/blockquote&gt;




&lt;div class="ltag__link"&gt;
  &lt;a href="/jaiminbariya" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1763695%2Fb9acc50b-20e7-4d58-a69e-e769d20959e4.png" alt="jaiminbariya"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/jaiminbariya/top-10-tech-podcasts-for-software-engineers-to-level-up-in-2025-518j" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Top 10 Tech Podcasts for Software Engineers to Level Up in 2025&lt;/h2&gt;
      &lt;h3&gt;Jaimin Bariya ・ Jan 26&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#programming&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#softwaredevelopment&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#podcast&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#hacktoberfest23&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/jaiminbariya" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1763695%2Fb9acc50b-20e7-4d58-a69e-e769d20959e4.png" alt="jaiminbariya"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/jaiminbariya/python-complexity-cheat-sheet-3plf" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Python Complexity Cheat Sheet 🚀&lt;/h2&gt;
      &lt;h3&gt;Jaimin Bariya ・ Jan 25&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#python&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#datastructures&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#career&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>datascience</category>
      <category>ai</category>
      <category>machinelearning</category>
      <category>deeplearning</category>
    </item>
    <item>
      <title>Top 10 Tech Podcasts for Software Engineers to Level Up in 2025</title>
      <dc:creator>Jaimin Bariya</dc:creator>
      <pubDate>Sun, 26 Jan 2025 04:04:30 +0000</pubDate>
      <link>https://dev.to/jaiminbariya/top-10-tech-podcasts-for-software-engineers-to-level-up-in-2025-518j</link>
      <guid>https://dev.to/jaiminbariya/top-10-tech-podcasts-for-software-engineers-to-level-up-in-2025-518j</guid>
      <description>&lt;h3&gt;
  
  
  Top 10 Tech Podcasts for Software Engineers to Level Up in 2025
&lt;/h3&gt;

&lt;p&gt;Okay, Let's come to the points (introduction later 🫡)&lt;/p&gt;

&lt;p&gt;Podcasts are a treasure trove of insights for software engineers looking to sharpen their skills and stay up-to-date with industry trends. Here’s a roundup of the best tech podcasts you should tune into:&lt;/p&gt;




&lt;h4&gt;
  
  
  1. &lt;strong&gt;Soft Skills Engineering&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;While technical skills are critical, soft skills like communication, teamwork, and emotional intelligence can set you apart. This podcast provides practical advice on balancing these aspects with technical expertise. Episodes are humorous yet packed with actionable tips.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best For&lt;/strong&gt;: Developers working in team environments or client-facing roles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://softskills.audio/" rel="noopener noreferrer"&gt;Soft Skills Engineering&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  2. &lt;strong&gt;Talk Python to Me&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;If Python is your go-to language, this podcast is a must-listen. Host Michael Kennedy dives into topics like web development, data science, machine learning, and Python frameworks. Expect deep conversations with Python community leaders.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best For&lt;/strong&gt;: Python enthusiasts and data science learners.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://talkpython.fm/" rel="noopener noreferrer"&gt;Talk Python to Me&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  3. &lt;strong&gt;The Changelog&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Exploring open-source projects? This podcast highlights the creators and maintainers of impactful projects. Hosts Adam Stacoviak and Jerod Santo delve into the evolution of open-source software and community contributions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best For&lt;/strong&gt;: Developers passionate about open-source.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://changelog.com/podcast" rel="noopener noreferrer"&gt;The Changelog&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  4. &lt;strong&gt;Darknet Diaries&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Peek into the world of cybersecurity with true stories of hacking, breaches, and cybercrime. Jack Rhysider makes technical security topics accessible while keeping listeners engaged with thrilling storytelling.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best For&lt;/strong&gt;: Engineers interested in cybersecurity and ethical hacking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://darknetdiaries.com/" rel="noopener noreferrer"&gt;Darknet Diaries&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  5. &lt;strong&gt;Coding Blocks&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Focused on software architecture, design patterns, and clean code principles, this podcast helps developers understand high-level concepts with practical examples.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best For&lt;/strong&gt;: Engineers aiming to grow their system design and architectural knowledge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://www.codingblocks.net/" rel="noopener noreferrer"&gt;Coding Blocks&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  6. &lt;strong&gt;Software Engineering Daily&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Daily episodes that cover a variety of tech topics, including programming, artificial intelligence, and cloud computing. Industry leaders share insights, making it a reliable source for learning new technologies.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best For&lt;/strong&gt;: Staying updated with tech trends.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://softwareengineeringdaily.com/" rel="noopener noreferrer"&gt;Software Engineering Daily&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  7. &lt;strong&gt;Developer Tea&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Short, actionable episodes tailored to busy developers. Topics include productivity, personal development, and decision-making, ideal for those looking for quick inspiration.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best For&lt;/strong&gt;: Engineers juggling multiple responsibilities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://developertea.com/" rel="noopener noreferrer"&gt;Developer Tea&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  8. &lt;strong&gt;Front End Happy Hour&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;A casual, fun podcast hosted by front-end engineers from companies like Netflix and Twitch. They discuss web development, JavaScript frameworks, and career growth, often over drinks.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best For&lt;/strong&gt;: Front-end developers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://frontendhappyhour.com/" rel="noopener noreferrer"&gt;Front End Happy Hour&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  9. &lt;strong&gt;Hanselminutes&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Hosted by Scott Hanselman, this podcast focuses on topics ranging from programming languages to diversity in tech. It’s perfect for developers who value inclusivity and innovation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best For&lt;/strong&gt;: Developers seeking a broad perspective on tech.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://www.hanselminutes.com/" rel="noopener noreferrer"&gt;Hanselminutes&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  10. &lt;strong&gt;Command Line Heroes&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Produced by Red Hat, this podcast narrates the history of software development, open source, and cloud technologies. It’s a mix of technical insight and storytelling.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best For&lt;/strong&gt;: Engineers curious about tech history and its impact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://www.redhat.com/en/command-line-heroes" rel="noopener noreferrer"&gt;Command Line Heroes&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Why Listen to Podcasts?
&lt;/h3&gt;

&lt;p&gt;Tech podcasts are a fantastic way to learn while commuting, exercising, or during downtime. They provide real-world insights from industry leaders and often share lessons not found in textbooks or blogs.&lt;/p&gt;

&lt;p&gt;Okay Here it is, My name is &lt;a href="https://github.com/jaimin-bariya" rel="noopener noreferrer"&gt;Jaimin Bariya&lt;/a&gt;, and I hope you will give all 5 likes if this post adds some value, Follow to grow together. Visit my &lt;a href="https://dev.to/jaiminbariya/python-complexity-cheat-sheet-3plf"&gt;special post&lt;/a&gt; 😅&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;Whether you're interested in mastering Python, exploring cybersecurity, or leveling up your soft skills, these podcasts are tailored to software engineers at all levels. Dive in and let the knowledge flow! 🎧&lt;/p&gt;

</description>
      <category>programming</category>
      <category>softwaredevelopment</category>
      <category>podcast</category>
      <category>hacktoberfest23</category>
    </item>
    <item>
      <title>Python Complexity Cheat Sheet 🚀</title>
      <dc:creator>Jaimin Bariya</dc:creator>
      <pubDate>Sat, 25 Jan 2025 04:42:34 +0000</pubDate>
      <link>https://dev.to/jaiminbariya/python-complexity-cheat-sheet-3plf</link>
      <guid>https://dev.to/jaiminbariya/python-complexity-cheat-sheet-3plf</guid>
      <description>&lt;h2&gt;
  
  
  📢 New GitHub Repo: Python Complexity Cheat Sheet 🚀
&lt;/h2&gt;

&lt;p&gt;Okay, Let's come to the point (introduction at the end 🤘)&lt;/p&gt;

&lt;p&gt;Hey Developers! 👋&lt;/p&gt;

&lt;p&gt;I’m thrilled to share that I’ve created a &lt;strong&gt;comprehensive Python Complexity Cheat Sheet&lt;/strong&gt; 🐍 for all the coders out there who want to write efficient and optimized Python code. This cheat sheet is designed to help you understand the &lt;strong&gt;average&lt;/strong&gt; and &lt;strong&gt;worst-case complexities&lt;/strong&gt; of operations across Python’s built-in data structures.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔗 Repository Link:
&lt;/h3&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/jaimin-bariya/python-complexity-cheatsheet" rel="noopener noreferrer"&gt;Python Complexity Cheat Sheet&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  💡 Why Did I Create This Repo?
&lt;/h3&gt;

&lt;p&gt;Understanding the time complexity of operations is &lt;strong&gt;essential&lt;/strong&gt; for writing scalable applications. Python’s built-in data structures like lists, dictionaries, sets, and tuples are powerful but knowing their performance under different operations can make a huge difference.&lt;/p&gt;

&lt;p&gt;This repo:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Summarizes complexities&lt;/strong&gt; of common operations (e.g., append, pop, sort, etc.).&lt;/li&gt;
&lt;li&gt;Covers &lt;strong&gt;lists&lt;/strong&gt;, &lt;strong&gt;dictionaries&lt;/strong&gt;, &lt;strong&gt;sets&lt;/strong&gt;, &lt;strong&gt;tuples&lt;/strong&gt;, and &lt;strong&gt;strings&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Is beginner-friendly and easy to reference during coding. ✅&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  📂 What’s Inside?
&lt;/h3&gt;

&lt;p&gt;Here’s a sneak peek into what you’ll find in the repo:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Lists&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Operations like &lt;code&gt;append&lt;/code&gt;, &lt;code&gt;pop&lt;/code&gt;, &lt;code&gt;remove&lt;/code&gt;, &lt;code&gt;sort&lt;/code&gt;, and more.&lt;/li&gt;
&lt;li&gt;Complexity tables for quick reference.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Dictionaries&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Key-based operations (&lt;code&gt;get&lt;/code&gt;, &lt;code&gt;pop&lt;/code&gt;, &lt;code&gt;setdefault&lt;/code&gt;) and iteration performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Sets&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Methods like &lt;code&gt;add&lt;/code&gt;, &lt;code&gt;remove&lt;/code&gt;, &lt;code&gt;union&lt;/code&gt;, &lt;code&gt;intersection&lt;/code&gt;, and their costs.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Tuples&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Immutable operations and their complexities.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Strings&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Performance of slicing, searching, and concatenation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Overview&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A high-level summary comparing all data structures.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  📖 How to Use This Repo?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Clone the repo:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git clone https://github.com/yourusername/python-complexity-cheatsheet.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Bookmark it for quick reference during coding. ⭐️&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  🙌 Contributions Welcome!
&lt;/h3&gt;

&lt;p&gt;If you find this repo helpful, feel free to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Give it a ⭐️ on GitHub.&lt;/li&gt;
&lt;li&gt;Share it with fellow developers.&lt;/li&gt;
&lt;li&gt;Submit a pull request if you spot improvements or want to add more content.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🌟 Bonus Repo Coming Soon!
&lt;/h3&gt;

&lt;p&gt;I’m also working on a &lt;strong&gt;Python DS Methods and Properties Cheat Sheet&lt;/strong&gt;, where you’ll find all the essential methods and properties for Python’s data structures. Stay tuned! 🔥&lt;/p&gt;

&lt;p&gt;Okay, I did it here it is -&amp;gt; &lt;a href="https://github.com/jaimin-bariya/python-methods-cheatsheet" rel="noopener noreferrer"&gt;&lt;strong&gt;Python DS Methods and Properties Cheat Sheet&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Let’s write efficient Python code together! 🐍✨&lt;/p&gt;

&lt;p&gt;Okay, My Name is &lt;a href="https://github.com/jaimin-bariya" rel="noopener noreferrer"&gt;Jaimin Bariya&lt;/a&gt;, a Simple developer, AKA Cloud Boy, Follow me to learn together, Keep your eyes on my GitHub for good products (forget to make the project, shift your self to make a product, In short, don't make a project, make product). &lt;/p&gt;

&lt;p&gt;Happy Coding! 😄&lt;/p&gt;

</description>
      <category>python</category>
      <category>datastructures</category>
      <category>webdev</category>
      <category>career</category>
    </item>
    <item>
      <title>371 SUM OF TWO INTEGERS - leetcode - Python</title>
      <dc:creator>Jaimin Bariya</dc:creator>
      <pubDate>Wed, 22 Jan 2025 06:52:53 +0000</pubDate>
      <link>https://dev.to/jaiminbariya/371-sum-of-two-integers-leetcode-python-11ff</link>
      <guid>https://dev.to/jaiminbariya/371-sum-of-two-integers-leetcode-python-11ff</guid>
      <description>&lt;p&gt;Let's come to the point &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftwtv7t04nt4qtbcpkpnw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftwtv7t04nt4qtbcpkpnw.png" alt="SUM OF TWO INTEGERS" width="738" height="674"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;We have to perform sum without using the &lt;code&gt;+&lt;/code&gt; operator. So developers &lt;code&gt;first thoughts,&lt;/code&gt; say -&amp;gt; I guess,` have to use binary manipulation, which is correct. &lt;/p&gt;

&lt;p&gt;Let's think more about this approach. &lt;/p&gt;




&lt;h2&gt;
  
  
  Do this like normal numbers
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdlqcjf045sh1t1mh2f4e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdlqcjf045sh1t1mh2f4e.png" alt="jaimin bariya, SUM OF TWO INTEGERS" width="185" height="164"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;start summing from the right side as usual, &lt;code&gt;1 + 1&lt;/code&gt;, &lt;code&gt;0 + 1&lt;/code&gt;, &lt;code&gt;1 + 0&lt;/code&gt;, and &lt;code&gt;0 + 0&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;because we are doing with binary, if the number goes to &lt;code&gt;2&lt;/code&gt; (sum) then make it 0 [like 1 + 1 -&amp;gt; 2 but we can not exceed 0 to 1]&lt;/li&gt;
&lt;li&gt;Do this with all numbers, we gate half answer, why because we did not care about carry numbers 😁&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5qqu7lfnb861jcbj9vgw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5qqu7lfnb861jcbj9vgw.png" alt="jaimin bariya, SUM OF TWO INTEGERS" width="446" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;this task can done by using the XOR bitwise operator, &lt;/p&gt;




&lt;h2&gt;
  
  
  Rule of XOR Operator
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;if bits are the same then -&amp;gt; &lt;code&gt;0&lt;/code&gt;, and if bits are different then -&amp;gt; &lt;code&gt;1&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This matches our need because we have to do &lt;code&gt;1 + 1&lt;/code&gt; -&amp;gt; &lt;code&gt;0&lt;/code&gt; and &lt;code&gt;0 + 1&lt;/code&gt; or &lt;code&gt;1 + 0&lt;/code&gt; -&amp;gt; &lt;code&gt;1&lt;/code&gt; (do the usual sum 🤘). and &lt;code&gt;0 + 0&lt;/code&gt; -&amp;gt; &lt;code&gt;0&lt;/code&gt;  [Based on XOR Rule - Same number than 0 and also usual 0 + 0 -&amp;gt; 0]&lt;/p&gt;




&lt;h2&gt;
  
  
  Cary your Carry Numbers [think little for them]
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Usually, we pass carry to the left number, read it again, I said pass carry to the left number, Here &lt;code&gt;developer's first thinking&lt;/code&gt; suggests about using shift operators like &lt;code&gt;&amp;lt;&amp;lt;&lt;/code&gt; and &lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt;. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But, How we get carry number, for that, think more about &lt;code&gt;and (&amp;amp;)&lt;/code&gt; operator. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;And &amp;amp;&lt;/code&gt; Operator rule said -&amp;gt; if both bits are &lt;code&gt;1&lt;/code&gt; then result is &lt;code&gt;1&lt;/code&gt;, Great we get carry for those where both bits are &lt;code&gt;1&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;To shift this to the left, we will use &lt;code&gt;&amp;lt;&amp;lt;&lt;/code&gt; left shift operator. example &lt;code&gt;0001 &amp;lt;&amp;lt; 1&lt;/code&gt; -&amp;gt; &lt;code&gt;0010&lt;/code&gt; &lt;/p&gt;




&lt;p&gt;Okay, Enough story building, now let's go to the &lt;code&gt;algorithm&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70jzwmcab3s6wvod3j59.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70jzwmcab3s6wvod3j59.png" alt="jaimin bariya, SUM OF TWO INTEGERS" width="589" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Algorithm:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Initial Step:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sum = a ^ b&lt;/code&gt;  (This is the XOR to get the sum without carry)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;carry = (a &amp;amp; b) &amp;lt;&amp;lt; 1&lt;/code&gt;  (This is the AND to get the carry, shifted left)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Repeat:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Until &lt;code&gt;carry == 0&lt;/code&gt;, update &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; as:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;a = sum&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;b = carry&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In each iteration, you compute the new sum and carry, until the carry becomes zero.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Example:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Let’s walk through the example of adding &lt;code&gt;5&lt;/code&gt; and &lt;code&gt;3&lt;/code&gt; step by step.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Initial Values:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2yynne3mvn9w1nd5z5c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2yynne3mvn9w1nd5z5c.png" alt="Image description" width="265" height="74"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;First iteration:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sum = a ^ b = 0101 ^ 0011 = 0110&lt;/code&gt; (sum without carry, which is &lt;code&gt;6&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;carry = (a &amp;amp; b) &amp;lt;&amp;lt; 1 = (0101 &amp;amp; 0011) &amp;lt;&amp;lt; 1 = 0001 &amp;lt;&amp;lt; 1 = 0010&lt;/code&gt; (carry of &lt;code&gt;2&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So now:&lt;br&gt;
   &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqoi81pivr84hwlr0cnpv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqoi81pivr84hwlr0cnpv.png" alt="Image description" width="196" height="77"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Second iteration:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sum = a ^ b = 0110 ^ 0010 = 0100&lt;/code&gt; (new sum, which is &lt;code&gt;4&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;carry = (a &amp;amp; b) &amp;lt;&amp;lt; 1 = (0110 &amp;amp; 0010) &amp;lt;&amp;lt; 1 = 0010 &amp;lt;&amp;lt; 1 = 0100&lt;/code&gt; (carry of &lt;code&gt;4&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now:&lt;br&gt;
   &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6rvmk1lhq8pb8frnth3x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6rvmk1lhq8pb8frnth3x.png" alt="Image description" width="195" height="81"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Third iteration:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sum = a ^ b = 0100 ^ 0100 = 0000&lt;/code&gt; (new sum, which is &lt;code&gt;0&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;carry = (a &amp;amp; b) &amp;lt;&amp;lt; 1 = (0100 &amp;amp; 0100) &amp;lt;&amp;lt; 1 = 0100 &amp;lt;&amp;lt; 1 = 1000&lt;/code&gt; (carry of &lt;code&gt;8&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now:&lt;br&gt;
   &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fklfburp7hmyzz0t94hqp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fklfburp7hmyzz0t94hqp.png" alt="Image description" width="196" height="76"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Fourth iteration:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sum = a ^ b = 0000 ^ 1000 = 1000&lt;/code&gt; (final sum, which is &lt;code&gt;8&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;carry = (a &amp;amp; b) &amp;lt;&amp;lt; 1 = (0000 &amp;amp; 1000) &amp;lt;&amp;lt; 1 = 0000 &amp;lt;&amp;lt; 1 = 0000&lt;/code&gt; (carry is now &lt;code&gt;0&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, the carry is &lt;code&gt;0&lt;/code&gt;, so we stop, and the final result is &lt;code&gt;8&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Pseudocode Thought Process
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use XOR to add without carry.&lt;/li&gt;
&lt;li&gt;Use AND + shift to compute the carry.&lt;/li&gt;
&lt;li&gt;Keep updating the result with XOR and carry until the carry becomes 0.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Okay, perfect, we done it. but when I run this, I got TLE error. &lt;br&gt;
    &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fygdxxv79skxhe3v65k4b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fygdxxv79skxhe3v65k4b.png" alt="jaimin bariya, SUM OF TWO INTEGERS" width="724" height="287"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;I got this error just because I am using Python for this manipulation, I will teach you why, and how to resolve this, but see what happens when I code in C++, jaimin bariya, SUM OF TWO INTEGERSImage description](&lt;a href="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k4u0x5sydlmfeyf8pdyc.png" rel="noopener noreferrer"&gt;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k4u0x5sydlmfeyf8pdyc.png&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is working, but if you are also using python for DSA like me, then congratulation, we have a chance to learn something new here. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  New Chapter begins
&lt;/h2&gt;

&lt;p&gt;We got this issue because python is unbounded, and it works well with positive integer but make problem with negative integer like we have shown in image, &lt;/p&gt;

&lt;p&gt;So, the main issue arises when working with negative numbers in Python because integers in Python are unbounded, unlike in many other programming languages where integers are represented using fixed bits (e.g., 32-bit or 64-bit integers). &lt;/p&gt;

&lt;h3&gt;
  
  
  What’s Happening in the Code:
&lt;/h3&gt;

&lt;p&gt;In your implementation, you're calculating &lt;strong&gt;carry&lt;/strong&gt; as:&lt;br&gt;
    &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F01kc5cv6lhhdgou0gnm9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F01kc5cv6lhhdgou0gnm9.png" alt="Image description" width="228" height="54"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;a &amp;amp; b&lt;/code&gt;&lt;/strong&gt;: This finds the bits where both &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; are &lt;code&gt;1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;lt;&amp;lt; 1&lt;/code&gt;&lt;/strong&gt;: This shifts all bits of the result left by 1 position to simulate carrying them over for addition.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Problem with Negative Numbers in Python:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Infinite Precision Integers&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python's integers are &lt;strong&gt;not fixed-size&lt;/strong&gt; like in many other languages (e.g., 32-bit or 64-bit integers). &lt;/li&gt;
&lt;li&gt;Instead, Python integers can grow in size as needed, meaning there's no limit to the number of bits used to represent a number.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Sign Bit Behavior&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In fixed-size integers (e.g., 32-bit), the &lt;strong&gt;most significant bit (MSB)&lt;/strong&gt; is reserved as the &lt;strong&gt;sign bit&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;0&lt;/code&gt; = Positive number&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;1&lt;/code&gt; = Negative number (two's complement form)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In Python, there’s no fixed MSB to act as the &lt;strong&gt;sign bit&lt;/strong&gt; because integers are &lt;strong&gt;unbounded&lt;/strong&gt;. Negative numbers are stored in two's complement form but don’t have a fixed number of bits.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Infinite Carry Growth&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When working with negative numbers, the &lt;code&gt;&amp;amp;&lt;/code&gt; operation can produce &lt;strong&gt;bits beyond the expected range&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;When you &lt;strong&gt;shift left (&lt;code&gt;&amp;lt;&amp;lt;&lt;/code&gt;)&lt;/strong&gt;, these bits can keep growing indefinitely.&lt;/li&gt;
&lt;li&gt;For example:
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyrq91z6ose0kun9jw600.png" alt="Image description" width="657" height="147"&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;(a &amp;amp; b)&lt;/code&gt; produces a bit pattern that keeps extending.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;&amp;lt; 1&lt;/code&gt; shifts the bits left, growing the number further.&lt;/li&gt;
&lt;li&gt;This can lead to an &lt;strong&gt;infinite loop&lt;/strong&gt; because the condition &lt;code&gt;b != 0&lt;/code&gt; never resolves.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why Fixed-Size Integers Avoid This:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In a &lt;strong&gt;32-bit integer&lt;/strong&gt;, bits are confined to 32 positions.&lt;/li&gt;
&lt;li&gt;Shifting left (&lt;code&gt;&amp;lt;&amp;lt;&lt;/code&gt;) causes &lt;strong&gt;overflow&lt;/strong&gt; (bits outside the range are discarded).&lt;/li&gt;
&lt;li&gt;This keeps the calculation bounded, ensuring the loop terminates.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Fix in Python:
&lt;/h3&gt;

&lt;p&gt;To prevent infinite growth, you can &lt;strong&gt;simulate fixed-size integers&lt;/strong&gt; using a mask to limit the bits:&lt;br&gt;
    &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fder0ps6wanqta3xqg2u9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fder0ps6wanqta3xqg2u9.png" alt="Image description" width="349" height="83"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This ensures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only the &lt;strong&gt;last 32 bits&lt;/strong&gt; are considered.&lt;/li&gt;
&lt;li&gt;The calculation doesn’t grow indefinitely.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Takeaway:
&lt;/h3&gt;

&lt;p&gt;Because Python integers are &lt;strong&gt;unbounded&lt;/strong&gt;, operations like &lt;code&gt;&amp;amp;&lt;/code&gt; and &lt;code&gt;&amp;lt;&amp;lt;&lt;/code&gt; on negative numbers can create &lt;strong&gt;infinite precision values&lt;/strong&gt;, causing your loop to run forever. Using a mask helps simulate fixed-size integer behavior to avoid this issue. 🚀&lt;/p&gt;




&lt;h2&gt;
  
  
  Challenges with Negative Numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;When performing bitwise operations on negative numbers in Python, the lack of a fixed bit-width can lead to unexpected results. For example, the left shift operation &amp;lt;&amp;lt; can cause the number to grow indefinitely, leading to a Time Limit Exceeded (TLE) error in competitive programming or coding platforms.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Solution
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;To handle negative numbers correctly, you can simulate a fixed bit-width environment. Here's how you can modify your function to work within a 32-bit integer range:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftk3hwsqpme3d5nu6af8i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftk3hwsqpme3d5nu6af8i.png" alt="Image description" width="668" height="557"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Explanation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;MASK&lt;/code&gt;: 0xFFFFFFFF is a 32-bit mask (all bits set to 1). Applying &amp;amp; MASK ensures that we only consider the last 32 bits of the result, effectively simulating a 32-bit integer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;MAX_INT&lt;/code&gt;: 0x7FFFFFFF represents the maximum positive value for a 32-bit signed integer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Handling Negative Results: If the result a exceeds MAX_INT, it indicates a negative number in 32-bit two's complement form. To convert it to a Python negative integer, we use the bitwise complement operator &lt;code&gt;~&lt;/code&gt; in conjunction with &lt;code&gt;^ MASK&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff697ngxcyiozkuj45raz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff697ngxcyiozkuj45raz.png" alt="jaimin bariya, SUM OF TWO INTEGERS" width="634" height="551"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The code &lt;code&gt;if a &amp;gt; MAX_INT: a = ~(a ^ MASK)&lt;/code&gt; ensures that &lt;code&gt;a&lt;/code&gt; stays within the &lt;strong&gt;32-bit signed integer range&lt;/strong&gt;. &lt;/p&gt;

&lt;h3&gt;
  
  
  What Happens:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;a ^ MASK&lt;/code&gt;&lt;/strong&gt;: Flips all the bits of &lt;code&gt;a&lt;/code&gt; (simulate overflow).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;~(...)&lt;/code&gt;&lt;/strong&gt;: Converts the flipped result back into a &lt;strong&gt;negative number&lt;/strong&gt; (32-bit two's complement).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This handles &lt;strong&gt;overflow&lt;/strong&gt; caused by Python's unbounded integers, making sure &lt;code&gt;a&lt;/code&gt; behaves like a 32-bit signed integer.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;a = 2147483648&lt;/code&gt; (overflowed), it becomes &lt;code&gt;-2147483648&lt;/code&gt; after this operation.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Example with negative number
&lt;/h2&gt;

&lt;p&gt;Let's break it down using your &lt;strong&gt;specific example&lt;/strong&gt; where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;a = -12&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;b = -8&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is to compute &lt;strong&gt;a + b&lt;/strong&gt; using the bitwise operations in 32-bit integer arithmetic. Let's see why the output differs and how the &lt;code&gt;if a &amp;gt; MAX_INT&lt;/code&gt; condition fixes it.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step-by-Step Explanation
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Initial Values&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;a = -12&lt;/code&gt; → In 32-bit signed representation: &lt;code&gt;0xFFFFFFF4&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;b = -8&lt;/code&gt; → In 32-bit signed representation: &lt;code&gt;0xFFFFFFF8&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;Bitwise Addition Logic&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;First Iteration&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sum = a ^ b&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;a ^ b = 0xFFFFFFF4 ^ 0xFFFFFFF8 = 0xFFFFFFFC&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;carry = (a &amp;amp; b) &amp;lt;&amp;lt; 1&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;a &amp;amp; b = 0xFFFFFFF4 &amp;amp; 0xFFFFFFF8 = 0xFFFFFFF0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;carry = 0xFFFFFFF0 &amp;lt;&amp;lt; 1 = 0xFFFFFFE0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Update &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt;&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;a = sum = 0xFFFFFFFC&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;b = carry = 0xFFFFFFE0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;Repeat Until &lt;code&gt;b == 0&lt;/code&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Second Iteration&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sum = a ^ b&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;a ^ b = 0xFFFFFFFC ^ 0xFFFFFFE0 = 0x0000001C&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;carry = (a &amp;amp; b) &amp;lt;&amp;lt; 1&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;a &amp;amp; b = 0xFFFFFFFC &amp;amp; 0xFFFFFFE0 = 0xFFFFFFE0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;carry = 0xFFFFFFE0 &amp;lt;&amp;lt; 1 = 0xFFFFFFC0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Update:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;a = sum = 0x0000001C&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;b = carry = 0xFFFFFFC0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Third Iteration&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Keep repeating this process until &lt;code&gt;b = 0&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;Final Result in Python&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;After the loop ends, the raw value of &lt;code&gt;a&lt;/code&gt; is &lt;code&gt;0xFFFFFFEC&lt;/code&gt;, which is &lt;strong&gt;4294967276 in Python&lt;/strong&gt; because Python treats it as an &lt;strong&gt;unbounded integer&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;Adjusting for 32-bit Signed Range&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;To ensure the result fits into a &lt;strong&gt;32-bit signed integer range&lt;/strong&gt;, we do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Define constants:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;MAX_INT = 0x7FFFFFFF&lt;/code&gt; (2147483647)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MASK = 0xFFFFFFFF&lt;/code&gt; (all bits set to 1)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Handle Overflow&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;a &amp;gt; MAX_INT&lt;/code&gt;, we convert it back to its &lt;strong&gt;negative form&lt;/strong&gt;:
&lt;code&gt;&lt;/code&gt;&lt;code&gt;python
a = ~(a ^ MASK)
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Here:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;a = 4294967276&lt;/code&gt; (decimal)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;a ^ MASK = 4294967276 ^ 0xFFFFFFFF = 0x13&lt;/code&gt; (decimal 20)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~(a ^ MASK) = ~0x13 = -20&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Final Output
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The corrected result after handling overflow is:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;a + b = -20&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This step ensures the output matches the &lt;strong&gt;expected value&lt;/strong&gt; in &lt;strong&gt;32-bit arithmetic&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Why the Condition Exists
&lt;/h3&gt;

&lt;p&gt;Without the &lt;code&gt;if a &amp;gt; MAX_INT&lt;/code&gt; logic, Python's integers overflow to large positive numbers (e.g., &lt;code&gt;4294967276&lt;/code&gt; instead of &lt;code&gt;-20&lt;/code&gt;). This condition ensures we bring the result back into the &lt;strong&gt;32-bit signed range&lt;/strong&gt;, making it behave like a real 32-bit system.&lt;/p&gt;

&lt;p&gt;Simple and done! 😊&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;My Name is Jaimin Bariya, if you find something useful give all 5 likes plz, and throw a comment below, and Follow me on github &lt;a href="https://github.com/jaimin-bariya" rel="noopener noreferrer"&gt;jaimin-bariya&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>learning</category>
      <category>python</category>
      <category>programming</category>
      <category>datastructures</category>
    </item>
    <item>
      <title>Leetcode Blind 75</title>
      <dc:creator>Jaimin Bariya</dc:creator>
      <pubDate>Sun, 12 Jan 2025 04:04:59 +0000</pubDate>
      <link>https://dev.to/jaiminbariya/leetcode-blind-75-49mp</link>
      <guid>https://dev.to/jaiminbariya/leetcode-blind-75-49mp</guid>
      <description>&lt;p&gt;Let's come to the point&lt;/p&gt;

&lt;p&gt;I have created a list of Blind 75 because when I searched for it, it was on GFG, but I wanted it on leetcode (IDK why!!). So here it is the list of Blind 75 on leetcode&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One request, some of the problems are premium, so if anyone found these problems on an alternative platform, plz comment it for all :)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you have little bit more time plz start this repo &lt;a href="https://github.com/jaimin-bariya/blind-75-leetcode" rel="noopener noreferrer"&gt;Blind-75&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Array&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/two-sum/" rel="noopener noreferrer"&gt;Two Sum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/best-time-to-buy-and-sell-stock/" rel="noopener noreferrer"&gt;Best Time to Buy and Sell Stock&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/contains-duplicate/" rel="noopener noreferrer"&gt;Contains Duplicate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/product-of-array-except-self/" rel="noopener noreferrer"&gt;Product of Array Except Self&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/maximum-subarray/" rel="noopener noreferrer"&gt;Maximum Subarray&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/maximum-product-subarray/" rel="noopener noreferrer"&gt;Maximum Product Subarray&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/" rel="noopener noreferrer"&gt;Find Minimum in Rotated Sorted Array&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/search-in-rotated-sorted-array/" rel="noopener noreferrer"&gt;Search in Rotated Sorted Array&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/3sum/" rel="noopener noreferrer"&gt;3Sum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/container-with-most-water/" rel="noopener noreferrer"&gt;Container With Most Water&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Binary&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/sum-of-two-integers/" rel="noopener noreferrer"&gt;Sum of Two Integers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/number-of-1-bits/" rel="noopener noreferrer"&gt;Number of 1 Bits&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/counting-bits/" rel="noopener noreferrer"&gt;Counting Bits&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/missing-number/" rel="noopener noreferrer"&gt;Missing Number&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/reverse-bits/" rel="noopener noreferrer"&gt;Reverse Bits&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Dynamic Programming&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/climbing-stairs/" rel="noopener noreferrer"&gt;Climbing Stairs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/coin-change/" rel="noopener noreferrer"&gt;Coin Change&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/longest-increasing-subsequence/" rel="noopener noreferrer"&gt;Longest Increasing Subsequence&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/longest-common-subsequence/" rel="noopener noreferrer"&gt;Longest Common Subsequence&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/word-break/" rel="noopener noreferrer"&gt;Word Break&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/combination-sum-iv/" rel="noopener noreferrer"&gt;Combination Sum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/house-robber/" rel="noopener noreferrer"&gt;House Robber&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/house-robber-ii/" rel="noopener noreferrer"&gt;House Robber II&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/decode-ways/" rel="noopener noreferrer"&gt;Decode Ways&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/unique-paths/" rel="noopener noreferrer"&gt;Unique Paths&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/jump-game/" rel="noopener noreferrer"&gt;Jump Game&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Graph&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/clone-graph/" rel="noopener noreferrer"&gt;Clone Graph&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/course-schedule/" rel="noopener noreferrer"&gt;Course Schedule&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/course-schedule-ii/" rel="noopener noreferrer"&gt;Course Schedule II&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/pacific-atlantic-water-flow/" rel="noopener noreferrer"&gt;Pacific Atlantic Water Flow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/number-of-islands/" rel="noopener noreferrer"&gt;Number of Islands&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/longest-consecutive-sequence/" rel="noopener noreferrer"&gt;Longest Consecutive Sequence&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://leetcode.com/problems/alien-dictionary/" rel="noopener noreferrer"&gt;Alien Dictionary&lt;/a&gt; &lt;em&gt;(Leetcode Premium)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://leetcode.com/problems/graph-valid-tree/" rel="noopener noreferrer"&gt;Graph Valid Tree&lt;/a&gt; &lt;em&gt;(Leetcode Premium)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/" rel="noopener noreferrer"&gt;Number of Connected Components in an Undirected Graph&lt;/a&gt; &lt;em&gt;(Leetcode Premium)&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Interval&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/insert-interval/" rel="noopener noreferrer"&gt;Insert Interval&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/merge-intervals/" rel="noopener noreferrer"&gt;Merge Intervals&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/non-overlapping-intervals/" rel="noopener noreferrer"&gt;Non-overlapping Intervals&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://leetcode.com/problems/meeting-rooms/" rel="noopener noreferrer"&gt;Meeting Rooms&lt;/a&gt; &lt;em&gt;(Leetcode Premium)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://leetcode.com/problems/meeting-rooms-ii/" rel="noopener noreferrer"&gt;Meeting Rooms II&lt;/a&gt; &lt;em&gt;(Leetcode Premium)&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Linked List&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/reverse-linked-list/" rel="noopener noreferrer"&gt;Reverse Linked List&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/linked-list-cycle/" rel="noopener noreferrer"&gt;Detect Cycle in a Linked List&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/merge-two-sorted-lists/" rel="noopener noreferrer"&gt;Merge Two Sorted Lists&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/merge-k-sorted-lists/" rel="noopener noreferrer"&gt;Merge k Sorted Lists&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/remove-nth-node-from-end-of-list/" rel="noopener noreferrer"&gt;Remove Nth Node From End of List&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/reorder-list/" rel="noopener noreferrer"&gt;Reorder List&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Matrix&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/set-matrix-zeroes/" rel="noopener noreferrer"&gt;Set Matrix Zeroes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/spiral-matrix/" rel="noopener noreferrer"&gt;Spiral Matrix&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/rotate-image/" rel="noopener noreferrer"&gt;Rotate Image&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/word-search/" rel="noopener noreferrer"&gt;Word Search&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;String&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/longest-substring-without-repeating-characters/" rel="noopener noreferrer"&gt;Longest Substring Without Repeating Characters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/longest-repeating-character-replacement/" rel="noopener noreferrer"&gt;Longest Repeating Character Replacement&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/minimum-window-substring/" rel="noopener noreferrer"&gt;Minimum Window Substring&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/valid-anagram/" rel="noopener noreferrer"&gt;Valid Anagram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/group-anagrams/" rel="noopener noreferrer"&gt;Group Anagrams&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/valid-parentheses/" rel="noopener noreferrer"&gt;Valid Parentheses&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/valid-palindrome/" rel="noopener noreferrer"&gt;Valid Palindrome&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/longest-palindromic-substring/" rel="noopener noreferrer"&gt;Longest Palindromic Substring&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/palindromic-substrings/" rel="noopener noreferrer"&gt;Palindromic Substrings&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://leetcode.com/problems/encode-and-decode-strings/" rel="noopener noreferrer"&gt;Encode and Decode Strings&lt;/a&gt; &lt;em&gt;(Leetcode Premium)&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Tree&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/maximum-depth-of-binary-tree/" rel="noopener noreferrer"&gt;Maximum Depth of Binary Tree&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/same-tree/" rel="noopener noreferrer"&gt;Same Tree&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/invert-binary-tree/" rel="noopener noreferrer"&gt;Invert Binary Tree&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/binary-tree-maximum-path-sum/" rel="noopener noreferrer"&gt;Binary Tree Maximum Path Sum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/binary-tree-level-order-traversal/" rel="noopener noreferrer"&gt;Binary Tree Level Order Traversal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/serialize-and-deserialize-binary-tree/" rel="noopener noreferrer"&gt;Serialize and Deserialize Binary Tree&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/subtree-of-another-tree/" rel="noopener noreferrer"&gt;Subtree of Another Tree&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/" rel="noopener noreferrer"&gt;Construct Binary Tree from Preorder and Inorder Traversal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/validate-binary-search-tree/" rel="noopener noreferrer"&gt;Validate Binary Search Tree&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/kth-smallest-element-in-a-bst/" rel="noopener noreferrer"&gt;Kth Smallest Element in a BST&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/" rel="noopener noreferrer"&gt;Lowest Common Ancestor of a Binary Search Tree&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://leetcode.com/problems/implement-trie-prefix-tree/" rel="noopener noreferrer"&gt;Implement Trie (Prefix Tree)&lt;/a&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Okay, then. My name is Jaimin Bariya. I write posts on DSA, Python, AI-ML, and React, but I love them all. So, if you found this content helpful, save it, give it all 5 likes (😅), and Share it on your LinkedIn if you are going to start this challenge today. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you have a little bit of time, plz comment to suggest to me what my next post on. See you next time 👋 🫡&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Happy Coding :)&lt;/p&gt;

</description>
      <category>dsa</category>
      <category>leetcode</category>
      <category>interviewprep</category>
      <category>python</category>
    </item>
    <item>
      <title>Why Quick Sort is Faster Than Heap Sort</title>
      <dc:creator>Jaimin Bariya</dc:creator>
      <pubDate>Sat, 11 Jan 2025 05:55:33 +0000</pubDate>
      <link>https://dev.to/jaiminbariya/why-quick-sort-is-faster-than-heap-sort-4aca</link>
      <guid>https://dev.to/jaiminbariya/why-quick-sort-is-faster-than-heap-sort-4aca</guid>
      <description>&lt;p&gt;Let's come to the point...&lt;/p&gt;

&lt;p&gt;Sorting algorithms are fundamental to computer science, and two common algorithms often discussed are &lt;strong&gt;Quick Sort&lt;/strong&gt; and &lt;strong&gt;Heap Sort&lt;/strong&gt;. While both have similar time complexities, their performance in real-world scenarios can differ significantly. In this article, we’ll dive into why &lt;strong&gt;Quick Sort&lt;/strong&gt; is generally faster than &lt;strong&gt;Heap Sort&lt;/strong&gt; despite both having the same average time complexity.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Time Complexity and Space Complexity&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Let’s start by comparing the &lt;strong&gt;time complexity&lt;/strong&gt; (TC) and &lt;strong&gt;space complexity&lt;/strong&gt; (SC) of both algorithms.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Quick Sort:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best and Average Case&lt;/strong&gt;: &lt;strong&gt;O(N log N)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Worst Case&lt;/strong&gt;: &lt;strong&gt;O(N²)&lt;/strong&gt; (when pivot selection is poor)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Heap Sort:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best, Average, and Worst Case&lt;/strong&gt;: &lt;strong&gt;O(N log N)&lt;/strong&gt; (consistent)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Space Complexity:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quick Sort&lt;/strong&gt;: &lt;strong&gt;O(log N)&lt;/strong&gt; (due to recursion stack in best/average case)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Heap Sort&lt;/strong&gt;: &lt;strong&gt;O(1)&lt;/strong&gt; (in-place, no extra space for heap)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why Quick Sort is Faster&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Even though both algorithms have &lt;strong&gt;O(N log N)&lt;/strong&gt; time complexity in the average case, &lt;strong&gt;Quick Sort&lt;/strong&gt; tends to outperform &lt;strong&gt;Heap Sort&lt;/strong&gt; in real-world applications. Let's break down why that happens.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. &lt;strong&gt;Cache Efficiency and Memory Access&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quick Sort&lt;/strong&gt; is an &lt;strong&gt;in-place sorting algorithm&lt;/strong&gt;, meaning it rearranges elements within the same array. This leads to &lt;strong&gt;better cache locality&lt;/strong&gt;, as elements that are close in the array are also close in memory. This makes Quick Sort more &lt;strong&gt;cache-friendly&lt;/strong&gt;, which speeds it up in practical use cases.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On the other hand, &lt;strong&gt;Heap Sort&lt;/strong&gt; relies on a &lt;strong&gt;binary heap&lt;/strong&gt; structure. The heap requires &lt;strong&gt;random memory access&lt;/strong&gt; for operations like heapifying and extracting elements, leading to more &lt;strong&gt;cache misses&lt;/strong&gt; and slower performance compared to Quick Sort.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. &lt;strong&gt;Constant Factors and Overhead&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quick Sort&lt;/strong&gt; has &lt;strong&gt;smaller constant factors&lt;/strong&gt; due to its partitioning approach. It works by selecting a pivot and dividing the array into smaller sub-arrays, which are recursively sorted. This leads to fewer operations and &lt;strong&gt;lower overhead&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Heap Sort&lt;/strong&gt;, however, requires more complex operations to maintain the heap structure. Ensuring the heap property (parent nodes are larger or smaller than child nodes) introduces additional &lt;strong&gt;overhead&lt;/strong&gt;, making it slower in practice.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. &lt;strong&gt;Adaptability: Pivot Selection in Quick Sort&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;One of the advantages of &lt;strong&gt;Quick Sort&lt;/strong&gt; is its &lt;strong&gt;adaptive nature&lt;/strong&gt;. By using pivot selection techniques like &lt;strong&gt;median-of-three&lt;/strong&gt; or &lt;strong&gt;random pivots&lt;/strong&gt;, Quick Sort can minimize the chances of hitting its worst-case time complexity (O(N²)). This adaptability helps Quick Sort perform efficiently in most scenarios.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Heap Sort&lt;/strong&gt;, in contrast, does not have the same level of adaptability. It follows a fixed set of operations for building the heap and extracting elements, regardless of the input. This lack of adaptability means it can't optimize performance based on input data.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  4. &lt;strong&gt;Practical Performance&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In &lt;strong&gt;real-world scenarios&lt;/strong&gt;, &lt;strong&gt;Quick Sort&lt;/strong&gt; typically outperforms &lt;strong&gt;Heap Sort&lt;/strong&gt;. Its better cache efficiency, smaller constant factors, and pivot optimization allow it to run faster on most inputs. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;While &lt;strong&gt;Heap Sort&lt;/strong&gt; guarantees &lt;strong&gt;O(N log N)&lt;/strong&gt; time complexity for all cases, it is often slower due to &lt;strong&gt;higher overhead&lt;/strong&gt; and &lt;strong&gt;inefficient memory access patterns&lt;/strong&gt;. Because of this, Heap Sort is less commonly used in practice compared to Quick Sort.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To summarize:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quick Sort&lt;/strong&gt;: &lt;strong&gt;O(N log N)&lt;/strong&gt; average case, &lt;strong&gt;O(log N)&lt;/strong&gt; space, and faster in practice due to better cache performance, smaller overhead, and pivot optimization.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Heap Sort&lt;/strong&gt;: &lt;strong&gt;O(N log N)&lt;/strong&gt; for all cases, &lt;strong&gt;O(1)&lt;/strong&gt; space, but slower due to higher overhead and poor memory access patterns.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even though both algorithms have the same time complexity, &lt;strong&gt;Quick Sort&lt;/strong&gt; is typically faster in practical applications. Its &lt;strong&gt;cache-friendliness&lt;/strong&gt; and &lt;strong&gt;adaptive pivoting&lt;/strong&gt; make it more efficient overall, while &lt;strong&gt;Heap Sort&lt;/strong&gt; suffers from overhead and inefficiencies in memory usage.&lt;/p&gt;

&lt;p&gt;My Name is Jaimin Bariya, If you find this article helpful, give us all 5 likes 😅, and throw a comment plz. See you next time 👋&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Python's Magic Methods</title>
      <dc:creator>Jaimin Bariya</dc:creator>
      <pubDate>Sun, 29 Dec 2024 11:37:14 +0000</pubDate>
      <link>https://dev.to/jaiminbariya/pythons-magic-methods-1imk</link>
      <guid>https://dev.to/jaiminbariya/pythons-magic-methods-1imk</guid>
      <description>&lt;h2&gt;
  
  
  1 -&amp;gt; &lt;code&gt;__new__(cls)&lt;/code&gt; Method
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;__new__&lt;/code&gt; method is called when a new object is created in Python. It's responsible for &lt;strong&gt;creating and returning the new instance&lt;/strong&gt; of the class. This method is usually used when you want to &lt;strong&gt;customize object creation&lt;/strong&gt;, such as for &lt;strong&gt;singleton patterns&lt;/strong&gt;, caching, or managing memory.&lt;/p&gt;

&lt;h3&gt;
  
  
  When is &lt;code&gt;__new__&lt;/code&gt; Called?
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;__new__&lt;/code&gt; method is called &lt;strong&gt;before&lt;/strong&gt; &lt;code&gt;__init__&lt;/code&gt; and is used to create the new object. Here's the typical order of events when you create a new object:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;__new__&lt;/code&gt;&lt;/strong&gt;: Creates the object (memory allocation).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;__init__&lt;/code&gt;&lt;/strong&gt;: Initializes the object (setting up attributes).&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Use Cases for &lt;code&gt;__new__&lt;/code&gt;:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Singleton Pattern&lt;/strong&gt;:
The Singleton pattern ensures that only one instance of a class exists. In this case, &lt;code&gt;__new__&lt;/code&gt; checks if an instance already exists and reuses it, instead of creating a new one.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;   &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Singleton&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
       &lt;span class="n"&gt;_instance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;

       &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__new__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
           &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_instance&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
               &lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_instance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Singleton&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;__new__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
           &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_instance&lt;/span&gt;

   &lt;span class="n"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Singleton&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
   &lt;span class="n"&gt;s2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Singleton&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
   &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s1&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;s2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# True, both are the same instance
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Caching Objects&lt;/strong&gt;:
If you want to cache objects based on certain conditions, you can use &lt;code&gt;__new__&lt;/code&gt; to check if an object already exists (e.g., in a dictionary) before creating a new one. This can help optimize memory usage.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;   &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CachedObject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
       &lt;span class="n"&gt;_cache&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;

       &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__new__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
           &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_cache&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
               &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_cache&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
           &lt;span class="n"&gt;obj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;__new__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
           &lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_cache&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;obj&lt;/span&gt;
           &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;obj&lt;/span&gt;

   &lt;span class="n"&gt;obj1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;CachedObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hello&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="n"&gt;obj2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;CachedObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hello&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj1&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;obj2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# True, the same object is reused
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Memory Management&lt;/strong&gt;:&lt;br&gt;
If you want to control the memory allocation of objects (e.g., to optimize memory usage or manage large objects), &lt;code&gt;__new__&lt;/code&gt; can be used to customize how objects are created.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Immutable Objects&lt;/strong&gt;:&lt;br&gt;
&lt;code&gt;__new__&lt;/code&gt; is often used with immutable objects like tuples and strings. For instance, when you want to create a custom immutable object, you would override &lt;code&gt;__new__&lt;/code&gt; to ensure it’s properly created.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;   &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MyTuple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;tuple&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
       &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__new__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
           &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;__new__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

   &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;MyTuple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# (1, 2, 3)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  In Summary:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;__new__&lt;/code&gt; is called&lt;/strong&gt; when an object is being created and is responsible for &lt;strong&gt;returning the instance&lt;/strong&gt; of the class.&lt;/li&gt;
&lt;li&gt;It is useful for &lt;strong&gt;optimizing object creation&lt;/strong&gt;, implementing &lt;strong&gt;patterns like Singleton&lt;/strong&gt;, managing &lt;strong&gt;object caching&lt;/strong&gt;, or even &lt;strong&gt;customizing the memory allocation&lt;/strong&gt; process.&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>python</category>
      <category>dundermethod</category>
      <category>oop</category>
      <category>cleancode</category>
    </item>
    <item>
      <title>SQL Basic And Intermediate Questions For Interview</title>
      <dc:creator>Jaimin Bariya</dc:creator>
      <pubDate>Fri, 27 Dec 2024 11:27:34 +0000</pubDate>
      <link>https://dev.to/jaiminbariya/sql-basic-and-intermediate-questions-for-interview-3fbp</link>
      <guid>https://dev.to/jaiminbariya/sql-basic-and-intermediate-questions-for-interview-3fbp</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/jaiminbariya" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1763695%2Fb9acc50b-20e7-4d58-a69e-e769d20959e4.png" alt="jaiminbariya"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/jaiminbariya/sql-basic-and-intermediate-questions-for-interview-3jgo" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;SQL Basic and Intermediate Questions for Interview&lt;/h2&gt;
      &lt;h3&gt;Jaimin Bariya ・ Dec 27 '24&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#sql&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#mysql&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#interview&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#database&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>sql</category>
      <category>interview</category>
      <category>career</category>
    </item>
    <item>
      <title>SQL Basic and Intermediate Questions for Interview</title>
      <dc:creator>Jaimin Bariya</dc:creator>
      <pubDate>Fri, 27 Dec 2024 08:19:31 +0000</pubDate>
      <link>https://dev.to/jaiminbariya/sql-basic-and-intermediate-questions-for-interview-3jgo</link>
      <guid>https://dev.to/jaiminbariya/sql-basic-and-intermediate-questions-for-interview-3jgo</guid>
      <description>&lt;p&gt;Let's come to the point.&lt;/p&gt;

&lt;p&gt;I have created an &lt;a href="https://github.com/jaimin-bariya/Awesome-SQL-Interview" rel="noopener noreferrer"&gt;Awesome SQL Interview&lt;/a&gt; GitHub repo to prepare for interview questions and practice SQL queries. I have divided the SQL queries into three sections: Basic (L0), Intermediate (L1), and Advanced (L2). This is the solution for the basic section.&lt;/p&gt;

&lt;p&gt;This is L1 (Intermediate) SQL queries to practice, refer to &lt;a href="https://dev.to/jaiminbariya/sql-basic-question-for-interview-51j5"&gt;L0&lt;/a&gt; first for better practice.  &lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;Note: These examples are tested in MySQL. Syntax may vary for other databases like MS-SQL or Oracle.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  L1: Intermediate SQL
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Queries that involve working with multiple tables, using &lt;code&gt;JOIN&lt;/code&gt;, &lt;code&gt;GROUP BY&lt;/code&gt;, &lt;code&gt;HAVING&lt;/code&gt;, and complex &lt;code&gt;WHERE&lt;/code&gt; conditions.&lt;/li&gt;
&lt;li&gt;Introduction to subqueries, aggregate functions, and case statements.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Questions:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Write a query to retrieve the &lt;code&gt;customerName&lt;/code&gt; and &lt;code&gt;city&lt;/code&gt; for customers in 'USA' and 'France'.
&lt;/li&gt;
&lt;li&gt;How do you fetch the &lt;code&gt;employeeNumber&lt;/code&gt;, &lt;code&gt;lastName&lt;/code&gt;, and &lt;code&gt;officeCode&lt;/code&gt; of all employees who work in the 'San Francisco' office?
&lt;/li&gt;
&lt;li&gt;Write a query to find the total number of orders for each customer using &lt;code&gt;orders&lt;/code&gt; and &lt;code&gt;customers&lt;/code&gt; tables.
&lt;/li&gt;
&lt;li&gt;How do you retrieve the &lt;code&gt;productName&lt;/code&gt;, &lt;code&gt;quantityInStock&lt;/code&gt;, and &lt;code&gt;buyPrice&lt;/code&gt; for products that have been ordered more than 10 times?
&lt;/li&gt;
&lt;li&gt;Write a query to fetch the &lt;code&gt;orderNumber&lt;/code&gt;, &lt;code&gt;status&lt;/code&gt;, and &lt;code&gt;customerName&lt;/code&gt; for orders placed by a customer whose &lt;code&gt;customerNumber&lt;/code&gt; is 103.
&lt;/li&gt;
&lt;li&gt;Write a query to find the total sales value (&lt;code&gt;quantityOrdered * priceEach&lt;/code&gt;) for each order in the &lt;code&gt;orderdetails&lt;/code&gt; table.
&lt;/li&gt;
&lt;li&gt;How do you find the average &lt;code&gt;quantityOrdered&lt;/code&gt; for each &lt;code&gt;orderNumber&lt;/code&gt; in the &lt;code&gt;orderdetails&lt;/code&gt; table?
&lt;/li&gt;
&lt;li&gt;Write a query to list the &lt;code&gt;productLine&lt;/code&gt; with the highest total revenue (&lt;code&gt;quantityOrdered * priceEach&lt;/code&gt;) in the &lt;code&gt;orderdetails&lt;/code&gt; table.
&lt;/li&gt;
&lt;li&gt;Write a query to display the &lt;code&gt;employeeNumber&lt;/code&gt;, &lt;code&gt;firstName&lt;/code&gt;, &lt;code&gt;lastName&lt;/code&gt;, and the office name where the employee works by joining the &lt;code&gt;employees&lt;/code&gt; and &lt;code&gt;offices&lt;/code&gt; tables.
&lt;/li&gt;
&lt;li&gt;How do you find the customers who have never placed an order?
&lt;/li&gt;
&lt;li&gt;Write a query to retrieve the &lt;code&gt;customerName&lt;/code&gt; and the total number of orders placed by each customer (include customers who haven’t placed any orders).
&lt;/li&gt;
&lt;li&gt;Write a query to find the &lt;code&gt;productName&lt;/code&gt; and &lt;code&gt;quantityOrdered&lt;/code&gt; for all orders where the quantity of the product ordered is greater than 50.
&lt;/li&gt;
&lt;li&gt;Retrieve the &lt;code&gt;employeeNumber&lt;/code&gt;, &lt;code&gt;firstName&lt;/code&gt;, and &lt;code&gt;orderNumber&lt;/code&gt; of employees who are assigned as &lt;code&gt;sales representatives to customers&lt;/code&gt; that have placed an order.&lt;/li&gt;
&lt;li&gt;Write a query to calculate the average price of products in the &lt;code&gt;products&lt;/code&gt; table based on &lt;code&gt;buyPrice&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;How do you fetch the top 3 most expensive products in the &lt;code&gt;products&lt;/code&gt; table?
&lt;/li&gt;
&lt;li&gt;Write a query to retrieve the &lt;code&gt;customerName&lt;/code&gt;, &lt;code&gt;orderNumber&lt;/code&gt;, and &lt;code&gt;orderDate&lt;/code&gt; of all orders that have a status of 'Shipped'.
&lt;/li&gt;
&lt;li&gt;How do you display the total number of products sold for each &lt;code&gt;productLine&lt;/code&gt;?
&lt;/li&gt;
&lt;li&gt;Write a query to find employees who report directly to the employee with &lt;code&gt;employeeNumber = 1143&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;Write a query to calculate the total number of orders in the &lt;code&gt;orders&lt;/code&gt; table, grouped by &lt;code&gt;status&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;List employees with their manager’s name.&lt;/li&gt;
&lt;/ol&gt;




&lt;blockquote&gt;
&lt;p&gt;I will mention wrong things also, It is important to know what do to but also very important what not to do, and where we make mistake. let's go to  the point again...   &lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Solution with the explanation &lt;code&gt;WHERE&lt;/code&gt; needed
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Query to retrieve the &lt;code&gt;customerName&lt;/code&gt; and &lt;code&gt;city&lt;/code&gt; for customers in 'USA' and 'France'.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ba0e28cgr8s2y3aawto.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ba0e28cgr8s2y3aawto.png" alt="jaimin bariya, cloud boy" width="800" height="582"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;OR&lt;/code&gt; -&amp;gt; Slightly slower if there are a lot of conditions, as the query checks each condition one by one.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;IN&lt;/code&gt; -&amp;gt; slightly optimized internally by the database engine, especially for long lists.&lt;/li&gt;
&lt;li&gt;Both are fine for 2-3 conditions. For readability and scalability, &lt;code&gt;IN&lt;/code&gt; is better, especially when handling larger lists of values. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;IS&lt;/code&gt; is used for checking conditions like IS NULL or IS NOT NULL, not for string comparison.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fetch the &lt;code&gt;employeeNumber&lt;/code&gt;, &lt;code&gt;lastName&lt;/code&gt;, and &lt;code&gt;officeCode&lt;/code&gt; of all employees who work in the 'San Francisco' office.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq8zk6n1bep3bz9s2jsef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq8zk6n1bep3bz9s2jsef.png" alt="jaimin bariya, cloud boy" width="800" height="334"&gt;&lt;/a&gt;  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Query to find the total number of orders for each customer using &lt;code&gt;orders&lt;/code&gt; and &lt;code&gt;customers&lt;/code&gt; tables.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv0h6ncaaaf15o4va6v4o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv0h6ncaaaf15o4va6v4o.png" alt="jaimin bariya, cloud boy" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Always include non-aggregated columns in the GROUP BY clause when using aggregate functions in your query.&lt;/li&gt;
&lt;li&gt;This ensures SQL knows how to group rows and avoids ambiguity when selecting additional columns.&lt;/li&gt;
&lt;li&gt;In our example: &lt;code&gt;customerNumber&lt;/code&gt; and &lt;code&gt;customerName&lt;/code&gt; must both be in the &lt;code&gt;GROUP BY&lt;/code&gt; clause since we are selecting them along with &lt;code&gt;COUNT(*)&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 Golden Rule: &lt;br&gt;
   Every column in the &lt;code&gt;SELECT&lt;/code&gt; list must either:&lt;br&gt;
   Be in the &lt;code&gt;GROUP BY&lt;/code&gt; clause, OR&lt;br&gt;
   Use an aggregate function like &lt;code&gt;COUNT()&lt;/code&gt;, &lt;code&gt;SUM()&lt;/code&gt;, etc.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Retrieve the &lt;code&gt;productName&lt;/code&gt;, &lt;code&gt;quantityInStock&lt;/code&gt;, and &lt;code&gt;buyPrice&lt;/code&gt; for products that have been ordered more than 10 times?&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fug3bvlik73jhchpx75qf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fug3bvlik73jhchpx75qf.png" alt="jaimin bariya, cloud boy" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This query is efficient for small and medium size databases, for large sizes we can use indexes, and reduce data scanned using &lt;code&gt;WHERE&lt;/code&gt; clause instead of relying solely on &lt;code&gt;HAVING&lt;/code&gt; clause&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Fetch the &lt;code&gt;orderNumber&lt;/code&gt;, &lt;code&gt;status&lt;/code&gt;, and &lt;code&gt;customerName&lt;/code&gt; for orders placed by a customer whose &lt;code&gt;customerNumber&lt;/code&gt; is 103. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8to5pgjm19zajjb1mscq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8to5pgjm19zajjb1mscq.png" alt="jaimin bariya, cloud boy" width="800" height="609"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Explanation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tables Used:

&lt;ul&gt;
&lt;li&gt;orders: Contains orderNumber and status.&lt;/li&gt;
&lt;li&gt;customers: Contains customerName.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;INNER JOIN:

&lt;ul&gt;
&lt;li&gt;Combines orders and customers tables using the customerNumber column (common key).
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;WHERE Clause:

&lt;ul&gt;
&lt;li&gt;Filters the data to include only records where customerNumber = 103.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Columns Selected:

&lt;ul&gt;
&lt;li&gt;o.orderNumber: The order number.&lt;/li&gt;
&lt;li&gt;o.status: The order status.&lt;/li&gt;
&lt;li&gt;c.customerName: The name of the customer placing the order.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find the total sales value (&lt;code&gt;quantityOrdered * priceEach&lt;/code&gt;) for each order in the &lt;code&gt;orderdetails&lt;/code&gt; table.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy4jxkop1nv40f7vdocbf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy4jxkop1nv40f7vdocbf.png" alt="jaimin bariya, cloud boy" width="800" height="653"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Find the average &lt;code&gt;quantityOrdered&lt;/code&gt; for each &lt;code&gt;orderNumber&lt;/code&gt; in the &lt;code&gt;orderdetails&lt;/code&gt; table.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0fv3qwxobhkm3me9omge.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0fv3qwxobhkm3me9omge.png" alt="jaimin bariya, cloud boy" width="800" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Explanation:&lt;/li&gt;
&lt;li&gt;orderNumber:

&lt;ul&gt;
&lt;li&gt;Groups the rows by the orderNumber.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;AVG(quantityOrdered):

&lt;ul&gt;
&lt;li&gt;Calculates the average quantityOrdered for all rows that belong to the same orderNumber.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;GROUP BY:

&lt;ul&gt;
&lt;li&gt;Ensures the average is calculated for each orderNumber separately.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Query to list the &lt;code&gt;productLine&lt;/code&gt; with the highest total revenue (&lt;code&gt;quantityOrdered * priceEach&lt;/code&gt;) in the &lt;code&gt;orderdetails&lt;/code&gt; table.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F81e3w7olmhc9la754f9t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F81e3w7olmhc9la754f9t.png" alt="jaimin bariya, cloud boy" width="800" height="588"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Explanation:&lt;/li&gt;
&lt;li&gt;productLine:

&lt;ul&gt;
&lt;li&gt;Categorizes the products into different lines, like "Motorcycles" or "Planes."&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;SUM(od.&lt;code&gt;quantityOrdered&lt;/code&gt; * od.&lt;code&gt;priceEach&lt;/code&gt;):

&lt;ul&gt;
&lt;li&gt;Calculates the total revenue for each productLine.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;INNER JOIN:

&lt;ul&gt;
&lt;li&gt;Joins products and &lt;code&gt;orderdetails&lt;/code&gt; tables on &lt;code&gt;productCode&lt;/code&gt; to associate product lines with their order details.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;GROUP BY p.productLine:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Groups&lt;/code&gt; the results by each &lt;code&gt;productLine&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;ORDER BY &lt;code&gt;totalRevenue&lt;/code&gt; DESC:

&lt;ul&gt;
&lt;li&gt;Sorts the grouped results in descending order of revenue, so the highest revenue appears first.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;LIMIT 1:

&lt;ul&gt;
&lt;li&gt;Restricts the result to only the &lt;code&gt;productLine&lt;/code&gt; with the highest revenue.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Query to display the &lt;code&gt;employeeNumber&lt;/code&gt;, &lt;code&gt;firstName&lt;/code&gt;, &lt;code&gt;lastName&lt;/code&gt;, and the office name where the employee works by joining the &lt;code&gt;employees&lt;/code&gt; and &lt;code&gt;offices&lt;/code&gt; tables.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqmrm98idz9h5w9k9w53i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqmrm98idz9h5w9k9w53i.png" alt="jaimin bariya, cloud boy" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;CONCAT(column, 'separater', column, 'separater', column)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CONCAT_WS('separater', columns)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Find the customers who have never placed an order&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9czt3woynypcwsrdjtdp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9czt3woynypcwsrdjtdp.png" alt="jaimin bariya, cloud boy" width="800" height="523"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explanation&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LEFT JOIN:&lt;/strong&gt; Retrieves all customers from the &lt;code&gt;customers&lt;/code&gt; table, whether or not they have matching rows in the orders table.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;o.orderNumber&lt;/code&gt; IS NULL:&lt;/strong&gt; Identifies customers who do not have any corresponding orders (i.e., orderNumber is NULL because there's no match in the orders table).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Columns&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;customerNumber&lt;/code&gt;:&lt;/strong&gt; Unique identifier for the customer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;customerName&lt;/code&gt;:&lt;/strong&gt; Name of the customer.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Query to retrieve the &lt;code&gt;customerName&lt;/code&gt; and the total number of orders placed by each customer (include customers who haven’t placed any orders).  &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flaupf88n7jmmelsdb4co.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flaupf88n7jmmelsdb4co.png" alt="jaimin bariya, cloud boy" width="800" height="422"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find the &lt;code&gt;productName&lt;/code&gt; and &lt;code&gt;quantityOrdered&lt;/code&gt; for all orders where the quantity of the product ordered is greater than 50. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqa94ynjeub9c06g0nma.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqa94ynjeub9c06g0nma.png" alt="jaimin bariya, cloud boy" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Retrieve the &lt;code&gt;employeeNumber&lt;/code&gt;, &lt;code&gt;firstName&lt;/code&gt;, and &lt;code&gt;orderNumber&lt;/code&gt; of employees who are assigned as &lt;code&gt;sales representatives to customers&lt;/code&gt; that have placed an order.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvsagd0xozkuxhx0wllxu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvsagd0xozkuxhx0wllxu.png" alt="jaimin bariya, cloud boy" width="800" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Explanation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;FROM employees e&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;We start with the &lt;code&gt;employees&lt;/code&gt; table (aliased as e) because we want the employee details, specifically the &lt;code&gt;employeeNumber&lt;/code&gt; and &lt;code&gt;firstName&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;JOIN customers c ON e.employeeNumber = c.salesRepEmployeeNumber&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;We join the customers table (aliased as c) on the &lt;code&gt;employeeNumber&lt;/code&gt; from employees and &lt;code&gt;salesRepEmployeeNumber&lt;/code&gt; from customers. This creates the relationship between &lt;code&gt;employees&lt;/code&gt; (sales reps) and customers. Now, we can identify which employee is assigned to each customer.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;JOIN orders o ON c.customerNumber = o.customerNumber&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;We further join the orders table (aliased as o) with the &lt;code&gt;customers&lt;/code&gt; table using the &lt;code&gt;customerNumber&lt;/code&gt;. This gives us the orders placed by each customer.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SELECT e.employeeNumber, e.firstName, o.orderNumber&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;Finally, we select the &lt;code&gt;employeeNumber&lt;/code&gt; and firstName from the &lt;code&gt;employees&lt;/code&gt; table (sales reps) and the &lt;code&gt;orderNumber&lt;/code&gt; from the orders table for each customer who has placed an order.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Query to calculate the average price of products in the &lt;code&gt;products&lt;/code&gt; table based on &lt;code&gt;buyPrice&lt;/code&gt;.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk591vitfjy0hs3cht7xo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk591vitfjy0hs3cht7xo.png" alt="jaimin bariya, cloud boy" width="800" height="283"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fetch the top 3 most expensive products in the &lt;code&gt;products&lt;/code&gt; table?&lt;br&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foamqiwms8kpsta2qy71z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foamqiwms8kpsta2qy71z.png" alt="jaimin bariya, cloud boy" width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rretrieve the &lt;code&gt;customerName&lt;/code&gt;, &lt;code&gt;orderNumber&lt;/code&gt;, and &lt;code&gt;orderDate&lt;/code&gt; of all orders that have a status of 'Shipped'. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxt2jk0k8yuej0ttsts31.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxt2jk0k8yuej0ttsts31.png" alt="jaimin bariya, cloud boy" width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Display the total number of products sold for each &lt;code&gt;productLine&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxqk9asw7xqlgzcl4p79r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxqk9asw7xqlgzcl4p79r.png" alt="jaimin bariya, cloud boy" width="800" height="288"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find employees who report directly to the employee with &lt;code&gt;employeeNumber = 1143&lt;/code&gt;.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8egxar3covsaw8j1iw3h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8egxar3covsaw8j1iw3h.png" alt="jaimin bariya, cloud boy" width="800" height="292"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Query to calculate the total number of orders in the &lt;code&gt;orders&lt;/code&gt; table, grouped by &lt;code&gt;status&lt;/code&gt;.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnl0zpi3x044wqdxosteh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnl0zpi3x044wqdxosteh.png" alt="jaimin bariya, cloud boy" width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;List employees with their manager’s name.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffocgy8s08jidgqi8nse8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffocgy8s08jidgqi8nse8.png" alt="jaimin bariya, cloud boy" width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;Hey, My name is Jaimin Baria AKA Cloud Boy..., If you have enjoyed and learned something useful, like this post, add a comment, and visit my &lt;a href="https://github.com/jaimin-bariya/Awesome-SQL-Interview" rel="noopener noreferrer"&gt;Awesome SQL Interview&lt;/a&gt; GitHub repo. &lt;/p&gt;

&lt;p&gt;Don't forget to give it a start 😅. &lt;/p&gt;

&lt;p&gt;Happy Coding 🧑‍💻&lt;/p&gt;




&lt;h3&gt;
  
  
  Other Posts
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;SQL Practices:

&lt;ul&gt;
&lt;li&gt;Part 1

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/jaiminbariya/sql-basic-question-for-interview-51j5"&gt;L0: Basic SQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/jaiminbariya/sql-basic-and-intermediate-questions-for-interview-3jgo"&gt;L1: Intermediate SQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;L2: Advanced SQL - Will Come soon&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;System Design

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/jaiminbariya/implementation-of-acid-transaction-in-database-44nc"&gt;Implementation of ACID transaction in Database&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/jaiminbariya/acid-transactions-in-system-design-1i45"&gt;ACID Transactions in System Design&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  🛠️ Fixes Suggested by Readers
&lt;/h3&gt;

</description>
      <category>sql</category>
      <category>mysql</category>
      <category>interview</category>
      <category>database</category>
    </item>
    <item>
      <title>Steps to Create AI ML Solution</title>
      <dc:creator>Jaimin Bariya</dc:creator>
      <pubDate>Sun, 22 Dec 2024 11:47:49 +0000</pubDate>
      <link>https://dev.to/jaiminbariya/steps-to-create-ai-ml-solution-co9</link>
      <guid>https://dev.to/jaiminbariya/steps-to-create-ai-ml-solution-co9</guid>
      <description>&lt;p&gt;Detailed roadmap that will guide you through &lt;strong&gt;data collection&lt;/strong&gt;, &lt;strong&gt;model training&lt;/strong&gt;, and &lt;strong&gt;deployment&lt;/strong&gt;. This process is &lt;strong&gt;iterative&lt;/strong&gt;, so you'll often loop back to earlier steps as you fine-tune your solution.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Step 1: Understand the Problem&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Before gathering any data, you need to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Define the problem clearly&lt;/strong&gt;:
Understand what you're trying to solve. Is it a classification problem (e.g., spam detection), a regression problem (e.g., price prediction), or a recommendation system?
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Define success criteria&lt;/strong&gt;:
What does a successful model look like? For example, do you want 90% accuracy, low latency, or high precision?&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Step 2: Data Collection&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The data you gather should be directly tied to your problem. Here’s how to collect it:&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;A. Identify Data Sources&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Public Datasets&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Use datasets from places like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Kaggle&lt;/strong&gt;: Offers numerous datasets across different domains.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UCI Machine Learning Repository&lt;/strong&gt;: Another great place for data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Government data portals&lt;/strong&gt;: Some governments provide open datasets (e.g., &lt;a href="https://www.data.gov" rel="noopener noreferrer"&gt;data.gov&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Web Scraping&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
If your data source is not available, you can scrape websites using tools like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;BeautifulSoup&lt;/strong&gt; (Python library)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scrapy&lt;/strong&gt; (Python framework)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;APIs&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
You can use APIs to collect data from services like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Twitter API&lt;/strong&gt; (for social media data)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Maps API&lt;/strong&gt; (for location data)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Databases&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;&lt;br&gt;
Sometimes your company or project may already have access to databases (SQL, NoSQL) where data is stored.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;IoT Devices&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;&lt;br&gt;
If you're building an AI solution for hardware, collect data from sensors or other IoT devices.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;B. Data Quantity and Quality&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Collect &lt;strong&gt;enough data&lt;/strong&gt; to train the model. &lt;strong&gt;More data&lt;/strong&gt; usually leads to better models, but the data needs to be &lt;strong&gt;relevant&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quality over Quantity&lt;/strong&gt;: Make sure the data is &lt;strong&gt;clean&lt;/strong&gt; (no missing values, no outliers unless they are important).&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Step 3: Data Cleaning &amp;amp; Preprocessing&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Raw data is rarely in a form that can be directly fed into a model. Data cleaning involves:&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;A. Handle Missing Data&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Imputation&lt;/strong&gt;: Fill missing values with the mean, median, or mode (for numerical data) or the most common value (for categorical data).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove Missing Data&lt;/strong&gt;: Drop rows or columns with too many missing values.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;B. Remove or Fix Outliers&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Statistical Methods&lt;/strong&gt;: Use Z-scores, IQR, or visualizations like box plots to identify and remove or correct outliers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;C. Data Transformation&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Normalization/Standardization&lt;/strong&gt;: Scale numerical data (e.g., MinMax scaling, Z-score standardization).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Encoding Categorical Variables&lt;/strong&gt;: Convert categorical variables into numbers (e.g., &lt;strong&gt;One-hot encoding&lt;/strong&gt;, &lt;strong&gt;Label encoding&lt;/strong&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;D. Feature Engineering&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create new features&lt;/strong&gt; from existing ones (e.g., extracting day, month, or year from a date, creating ratios between columns).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature Selection&lt;/strong&gt;: Remove irrelevant or highly correlated features to reduce overfitting and improve model performance.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Step 4: Data Splitting&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Once your data is cleaned and ready, you need to split it into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Training Set&lt;/strong&gt; (usually 70-80%): Used to train the model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation Set&lt;/strong&gt; (usually 10-15%): Used to tune hyperparameters and validate the model’s performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test Set&lt;/strong&gt; (usually 10-15%): Used to evaluate the final model’s generalization to unseen data.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Step 5: Model Selection&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Choose an appropriate machine learning model based on your problem.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;A. Types of Models&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Supervised Learning&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Classification&lt;/strong&gt;: If the output is a category (e.g., spam vs. not spam).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Regression&lt;/strong&gt;: If the output is continuous (e.g., predicting house prices).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Unsupervised Learning&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Clustering&lt;/strong&gt;: Grouping similar data points (e.g., customer segmentation).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dimensionality Reduction&lt;/strong&gt;: Reducing the number of features while retaining essential information (e.g., PCA).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Reinforcement Learning&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Used when an agent learns by interacting with an environment to maximize rewards.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;B. Choose Algorithm&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Based on your problem, choose the model. Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Linear Regression&lt;/strong&gt;, &lt;strong&gt;Decision Trees&lt;/strong&gt;, &lt;strong&gt;Logistic Regression&lt;/strong&gt; for supervised tasks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;K-Means&lt;/strong&gt;, &lt;strong&gt;DBSCAN&lt;/strong&gt; for clustering.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;KNN&lt;/strong&gt;, &lt;strong&gt;Random Forests&lt;/strong&gt;, &lt;strong&gt;SVMs&lt;/strong&gt; for classification/regression.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Step 6: Model Training&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Train your model using the &lt;strong&gt;training set&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;A. Model Training Process&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fit the Model&lt;/strong&gt;: Use your training data to teach the model how to predict or classify.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track Performance&lt;/strong&gt;: During training, monitor the model’s performance (e.g., loss function, accuracy).&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;B. Hyperparameter Tuning&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Grid Search&lt;/strong&gt;: Try multiple combinations of hyperparameters to find the best set.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Random Search&lt;/strong&gt;: A faster alternative to Grid Search for hyperparameter tuning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bayesian Optimization&lt;/strong&gt;: An advanced technique to find the best model parameters.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Step 7: Model Evaluation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Evaluate the trained model using the &lt;strong&gt;validation set&lt;/strong&gt;. Use appropriate metrics to assess its performance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Accuracy&lt;/strong&gt;: Proportion of correct predictions (for classification).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Precision, Recall, F1-Score&lt;/strong&gt;: Useful when dealing with imbalanced classes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RMSE (Root Mean Squared Error)&lt;/strong&gt;: For regression problems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confusion Matrix&lt;/strong&gt;: To see true positives, false positives, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;A. Cross-Validation&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;K-fold cross-validation&lt;/strong&gt;: Split the data into &lt;strong&gt;k&lt;/strong&gt; parts and train and validate the model &lt;strong&gt;k&lt;/strong&gt; times, each time using a different fold as the validation set.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Step 8: Model Optimization &amp;amp; Tuning&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Improve your model based on the evaluation results.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;A. Regularization&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;L1&lt;/strong&gt; (Lasso) or &lt;strong&gt;L2&lt;/strong&gt; (Ridge) regularization to prevent overfitting by penalizing large coefficients.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;B. Ensemble Methods&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Use techniques like &lt;strong&gt;Random Forests&lt;/strong&gt;, &lt;strong&gt;Boosting&lt;/strong&gt; (e.g., &lt;strong&gt;XGBoost&lt;/strong&gt;, &lt;strong&gt;AdaBoost&lt;/strong&gt;) to combine multiple models and improve performance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;C. Model Stacking&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Combine predictions from multiple models (e.g., combining outputs from &lt;strong&gt;SVMs&lt;/strong&gt;, &lt;strong&gt;logistic regression&lt;/strong&gt;, and &lt;strong&gt;decision trees&lt;/strong&gt;).&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Step 9: Model Deployment&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Once the model performs well, deploy it to a production environment.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;A. Deployment Process&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Containerization&lt;/strong&gt;: Use &lt;strong&gt;Docker&lt;/strong&gt; to package the model and all dependencies in a container.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model Serving&lt;/strong&gt;: Use tools like &lt;strong&gt;Flask&lt;/strong&gt;, &lt;strong&gt;FastAPI&lt;/strong&gt;, or &lt;strong&gt;TensorFlow Serving&lt;/strong&gt; to expose the model as an API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI/CD Pipelines&lt;/strong&gt;: Automate model deployment with &lt;strong&gt;GitLab CI&lt;/strong&gt;, &lt;strong&gt;Jenkins&lt;/strong&gt;, or &lt;strong&gt;GitHub Actions&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;B. Scalability &amp;amp; Monitoring&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Ensure the system can handle real-world traffic (e.g., multiple API requests).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor&lt;/strong&gt;: Track the model’s real-time performance, and if it degrades over time, retrain the model with fresh data.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Step 10: Post-Deployment (Monitoring &amp;amp; Maintenance)&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model Drift&lt;/strong&gt;: Over time, the model might lose its accuracy due to changes in data patterns. Retrain it with new data regularly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A/B Testing&lt;/strong&gt;: Test multiple models against each other to see which one performs better in production.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Summary of the Full Process&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Problem Understanding&lt;/strong&gt; → 2. &lt;strong&gt;Data Collection&lt;/strong&gt; → 3. &lt;strong&gt;Data Cleaning &amp;amp; Preprocessing&lt;/strong&gt; → 4. &lt;strong&gt;Data Splitting&lt;/strong&gt; → 5. &lt;strong&gt;Model Selection&lt;/strong&gt; → 6. &lt;strong&gt;Model Training&lt;/strong&gt; → 7. &lt;strong&gt;Model Evaluation&lt;/strong&gt; → 8. &lt;strong&gt;Model Optimization &amp;amp; Tuning&lt;/strong&gt; → 9. &lt;strong&gt;Model Deployment&lt;/strong&gt; → 10. &lt;strong&gt;Post-Deployment Monitoring&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;The key is &lt;strong&gt;iterative refinement&lt;/strong&gt;. You might need to go back to earlier steps (like data collection or preprocessing) as you learn more about your model’s performance. And always keep an eye on &lt;strong&gt;reproducibility&lt;/strong&gt;, &lt;strong&gt;collaboration&lt;/strong&gt;, and &lt;strong&gt;scalability&lt;/strong&gt; throughout the process! 😎&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>ai</category>
      <category>development</category>
      <category>python</category>
    </item>
  </channel>
</rss>
