<?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: Mario Ruci</title>
    <description>The latest articles on DEV Community by Mario Ruci (@mrmarioruci).</description>
    <link>https://dev.to/mrmarioruci</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%2F1032632%2Ffe52ccfe-c80a-4843-9d59-2484618e9673.jpeg</url>
      <title>DEV Community: Mario Ruci</title>
      <link>https://dev.to/mrmarioruci</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mrmarioruci"/>
    <language>en</language>
    <item>
      <title>The effective Pull Request checklist</title>
      <dc:creator>Mario Ruci</dc:creator>
      <pubDate>Sat, 09 Nov 2024 09:42:01 +0000</pubDate>
      <link>https://dev.to/mrmarioruci/the-effective-pull-request-checklist-46fg</link>
      <guid>https://dev.to/mrmarioruci/the-effective-pull-request-checklist-46fg</guid>
      <description>&lt;p&gt;Pull requests are an integral part of the software engineering process. At some point, you will either need to open your first pull request or review one submitted by a colleague. To help you navigate this essential aspect of development effectively, here’s a concise checklist or guide that can assist you in creating impactful pull requests while minimizing unnecessary feedback.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Opening a PR&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When you're ready to submit a pull request, follow these steps to ensure clarity and completeness:&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Preparation&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🔘 &lt;strong&gt;Branching&lt;/strong&gt;: Ensure your changes are on a separate feature branch.&lt;/li&gt;
&lt;li&gt;🔘  &lt;strong&gt;Commit Changes&lt;/strong&gt;: Make sure your commits are well-organized and meaningful.&lt;/li&gt;
&lt;li&gt;🔘  &lt;strong&gt;Check Files&lt;/strong&gt;: Review which files are included in the commit to avoid unnecessary changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Documentation&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🔘  &lt;strong&gt;PR Description&lt;/strong&gt;: Write a clear and concise description of what the PR does, including:

&lt;ul&gt;
&lt;li&gt;Purpose of the changes&lt;/li&gt;
&lt;li&gt;Any relevant ticket or issue numbers&lt;/li&gt;
&lt;li&gt;Key features or modifications&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;🔘  &lt;strong&gt;Test Plan&lt;/strong&gt;: Outline how you tested your changes and any additional testing that may be required.&lt;/li&gt;

&lt;li&gt;🔘  &lt;strong&gt;Migration Notes&lt;/strong&gt;: If applicable, document any database migrations or breaking changes.&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Quality Checks&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before opening the PR, ensure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔘  &lt;strong&gt;Formatting&lt;/strong&gt;: Code is properly formatted according to project standards.&lt;/li&gt;
&lt;li&gt;🔘  &lt;strong&gt;Type Checking&lt;/strong&gt;: Run type checks (if applicable) to catch any type-related errors.&lt;/li&gt;
&lt;li&gt;🔘  &lt;strong&gt;Testing&lt;/strong&gt;: Ensure all relevant tests pass and consider adding new tests for new functionality.&lt;/li&gt;
&lt;li&gt;🔘  &lt;strong&gt;Documentation Updates&lt;/strong&gt;: Update any relevant documentation, such as READMEs or inline comments.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Reviewing a PR&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When reviewing someone else's pull request, follow these steps to provide constructive feedback:&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Initial Assessment&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🔘  &lt;strong&gt;Read the PR Description&lt;/strong&gt;: Understand what the author intended with the changes and how it relates to the associated ticket.&lt;/li&gt;
&lt;li&gt;🔘  &lt;strong&gt;Mental Model&lt;/strong&gt;: Formulate an idea of what you expect the changes to accomplish based on the description.&lt;/li&gt;
&lt;li&gt;🔘  &lt;strong&gt;Diff Comparison&lt;/strong&gt;: Mentally compare the changes in the PR with your expectations.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Code Quality Evaluation&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🔘  &lt;strong&gt;Functionality Check&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Verify that the code meets the requirements outlined in the ticket.&lt;/li&gt;
&lt;li&gt;Consider edge cases and potential side effects of the changes.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;🔘  &lt;strong&gt;Code Style&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Review for consistency in code style and formatting.&lt;/li&gt;
&lt;li&gt;Evaluate naming conventions for clarity and coherence.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;🔘  &lt;strong&gt;Duplication and Complexity&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Look for opportunities to reduce code duplication (DRY principle).&lt;/li&gt;
&lt;li&gt;Identify overly complex or coupled code that could be simplified.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Testing Review&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🔘  &lt;strong&gt;Test Coverage&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Ensure that unit tests adequately cover new functionality.&lt;/li&gt;
&lt;li&gt;Review integration and end-to-end tests if applicable.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;🔘  &lt;strong&gt;Test Plan Evaluation&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Assess whether the outlined test plan effectively covers all scenarios.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Final Checks&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🔘  &lt;strong&gt;Documentation Review&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Ensure that code is adequately commented where necessary.&lt;/li&gt;
&lt;li&gt;Check that any relevant documentation (e.g., READMEs) is updated.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;🔘  &lt;strong&gt;Constructive Feedback&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Provide clear, actionable feedback on areas for improvement.&lt;/li&gt;
&lt;li&gt;Engage in respectful discussions with the author if there are disagreements or clarifications needed.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;🔘  &lt;strong&gt;Approval Process&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Confirm that all your comments have been addressed before approving the PR.&lt;/li&gt;
&lt;li&gt;Conduct a final review to catch any missed issues before merging.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

</description>
      <category>programming</category>
      <category>git</category>
      <category>softwareengineering</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Setting up Redux on a React application.</title>
      <dc:creator>Mario Ruci</dc:creator>
      <pubDate>Sat, 02 Sep 2023 17:05:35 +0000</pubDate>
      <link>https://dev.to/mrmarioruci/setting-up-redux-on-a-react-application-4dmo</link>
      <guid>https://dev.to/mrmarioruci/setting-up-redux-on-a-react-application-4dmo</guid>
      <description>&lt;h1&gt;
  
  
  Setting up Redux on a react application.
&lt;/h1&gt;

&lt;p&gt;❓ &lt;strong&gt;What is Redux?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Redux is a state management library that helps you manage the state of your application in a predictable way. It follows the principles of a unidirectional data flow and immutability, making it easier to understand and debug your application's behavior. Redux is not tied to React but is commonly used with it to manage the application's global state.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installation (On an existing project)
&lt;/h3&gt;

&lt;p&gt;To get started with Redux, you'll need to install both the Redux library and the React bindings for Redux (&lt;strong&gt;&lt;code&gt;react-redux&lt;/code&gt;&lt;/strong&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// On your terminal run&lt;/span&gt;
&lt;span class="nx"&gt;npm&lt;/span&gt; &lt;span class="nx"&gt;install&lt;/span&gt; &lt;span class="nx"&gt;redux&lt;/span&gt; &lt;span class="nx"&gt;react&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;redux&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Project Folder Structure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;components&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;UserProfile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;js&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;actions&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;js&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="nx"&gt;userActions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;js&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="nx"&gt;cartActions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;js&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;reducers&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;js&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="nx"&gt;userReducer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;js&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="nx"&gt;cartReducer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;js&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="nx"&gt;store&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;js&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;js&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;js&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="kr"&gt;package&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="kr"&gt;package&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;lock&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;README&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;md&lt;/span&gt;
&lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Reducers
&lt;/h3&gt;

&lt;p&gt;In Redux, reducers specify how your application's state changes in response to actions. Begin by creating individual reducers for different parts of your application's state. Here's an example of two reducers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/state/reducers/userReducer.js&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;userReducer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt; &lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Handle user-related actions here&lt;/span&gt;
    &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;userReducer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/state/reducers/cartReducer.js&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cartReducer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Handle shopping cart actions here&lt;/span&gt;
    &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;cartReducer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Combine Reducers
&lt;/h4&gt;

&lt;p&gt;The setup follows a combined reducers structure to mirror a more realistic production environment with multiple reducers and actions based on sections of your application. To manage these individual reducers in your Redux store, create a root reducer by using Redux's &lt;strong&gt;&lt;code&gt;combineReducers&lt;/code&gt;&lt;/strong&gt; function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/state/reducers/index.js&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;combineReducers&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;redux&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;userReducer&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./userReducer&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;cartReducer&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./cartReducer&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rootReducer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;combineReducers&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;userReducer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;cartReducer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="c1"&gt;// Add more reducers here if needed&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;rootReducer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Actions
&lt;/h3&gt;

&lt;p&gt;Actions are payloads of information that send data from your application to your store. Define action types and action creators to describe what should happen in your application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/state/actions/userActions.js&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;updateUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;UPDATE_USER&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;userData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/state/actions/cartActions.js&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;addToCart&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ADD_TO_CART&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Store
&lt;/h3&gt;

&lt;p&gt;In your &lt;strong&gt;&lt;code&gt;store.js&lt;/code&gt;&lt;/strong&gt; (or equivalent) file, create the Redux store using the combined root reducer and set up Redux DevTools for easier debugging:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/state/store.js&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createStore&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;redux&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;rootReducer&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./reducers&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;store&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createStore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;rootReducer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;__REDUX_DEVTOOLS_EXTENSION__&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;__REDUX_DEVTOOLS_EXTENSION__&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c1"&gt;// Optional&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;store&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Configure the Redux Store and Wrap the Application
&lt;/h3&gt;

&lt;p&gt;In your &lt;strong&gt;&lt;code&gt;store.js&lt;/code&gt;&lt;/strong&gt; (or equivalent) file, create the Redux store using the combined root reducer and set up Redux DevTools for easier debugging:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/index.js&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;ReactDOM&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-dom&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Provider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-redux&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;store&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./state/store&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Import your Redux store&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./App&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;ReactDOM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Provider&lt;/span&gt; &lt;span class="na"&gt;store&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;store&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;App&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Provider&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;,&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Use in your components
&lt;/h3&gt;

&lt;p&gt;Finally you can start using and manipulating the state in your components.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/components/UserProfile.js&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useSelector&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useDispatch&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-redux&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;updateUser&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../redux/actions/userActions&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Import your Redux action&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;UserProfile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Use useSelector to access the user state from Redux&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useSelector&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Use useDispatch to get the dispatch function&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useDispatch&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;newName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setNewName&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handleNameChange&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;setNewName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handleUpdateUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Dispatch the updateUser action to update the user state in Redux&lt;/span&gt;
    &lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;updateUser&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;newName&lt;/span&gt; &lt;span class="p"&gt;}));&lt;/span&gt;
    &lt;span class="nf"&gt;setNewName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;User Profile&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Name: &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt;
          &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt;
          &lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Enter new name"&lt;/span&gt;
          &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;newName&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="na"&gt;onChange&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleNameChange&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleUpdateUser&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Update Name&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;UserProfile&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
      <category>redux</category>
    </item>
    <item>
      <title>Exploring Object-Oriented Programming Concepts with Diagrams</title>
      <dc:creator>Mario Ruci</dc:creator>
      <pubDate>Mon, 24 Apr 2023 07:26:45 +0000</pubDate>
      <link>https://dev.to/mrmarioruci/exploring-object-oriented-programming-concepts-with-diagrams-145i</link>
      <guid>https://dev.to/mrmarioruci/exploring-object-oriented-programming-concepts-with-diagrams-145i</guid>
      <description>&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%2F5uyayt2wssdhbumaxj1h.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%2F5uyayt2wssdhbumaxj1h.png" alt="Image description" width="800" height="546"&gt;&lt;/a&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%2F5imsfet1aio9ai6zmto4.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%2F5imsfet1aio9ai6zmto4.png" alt="Image description" width="800" height="548"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>programming</category>
      <category>beginners</category>
      <category>oop</category>
    </item>
    <item>
      <title>Guide to LeetCode: A Personal Guide to the Most Common and Useful Patterns for Solving Algorithm Questions</title>
      <dc:creator>Mario Ruci</dc:creator>
      <pubDate>Thu, 23 Feb 2023 19:26:47 +0000</pubDate>
      <link>https://dev.to/mrmarioruci/guide-to-leetcode-a-personal-guide-to-the-most-common-and-useful-patterns-for-solving-algorithm-questions-3p9e</link>
      <guid>https://dev.to/mrmarioruci/guide-to-leetcode-a-personal-guide-to-the-most-common-and-useful-patterns-for-solving-algorithm-questions-3p9e</guid>
      <description>&lt;p&gt;Are you tired of struggling with algorithm questions on LeetCode? As someone (with 5+ years of experience) who has started practicing and studying these problems, I can relate to the frustration of not knowing where to start or how to approach a particularly tricky question. After much trial and error, I have come up with a personal guide to the most common and useful patterns for solving algorithm questions, which I hope can help others navigate this challenging terrain.&lt;/p&gt;

&lt;p&gt;For each pattern I have listed 10 LeetCode questions to practice on and the list is sorted by learning curve.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;ol&gt;
    &lt;li&gt;
&lt;strong&gt;Brute Force - &lt;/strong&gt;Beginner&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Start simple. Try all possible solutions and check if they work.&lt;/p&gt;

&lt;p&gt;Practice:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Two Sum: &lt;a href="https://leetcode.com/problems/two-sum/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/two-sum/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Reverse Integer: &lt;a href="https://leetcode.com/problems/reverse-integer/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/reverse-integer/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Palindrome Number: &lt;a href="https://leetcode.com/problems/palindrome-number/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/palindrome-number/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Climbing Stairs: &lt;a href="https://leetcode.com/problems/climbing-stairs/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/climbing-stairs/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Valid Parentheses: &lt;a href="https://leetcode.com/problems/valid-parentheses/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/valid-parentheses/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Roman to Integer: &lt;a href="https://leetcode.com/problems/roman-to-integer/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/roman-to-integer/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Remove Duplicates from Sorted Array: &lt;a href="https://leetcode.com/problems/remove-duplicates-from-sorted-array/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/remove-duplicates-from-sorted-array/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Plus One: &lt;a href="https://leetcode.com/problems/plus-one/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/plus-one/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Merge Two Sorted Lists: &lt;a href="https://leetcode.com/problems/merge-two-sorted-lists/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/merge-two-sorted-lists/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Maximum Subarray: &lt;a href="https://leetcode.com/problems/maximum-subarray/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/maximum-subarray/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt; &lt;/p&gt;

&lt;p&gt;2. &lt;strong&gt;Greedy&lt;/strong&gt; - Beginner&lt;/p&gt;

&lt;p&gt;Make the locally optimal choice at each step and hope that it leads to a global optimum solution.&lt;/p&gt;

&lt;p&gt;Practice:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Jump Game: &lt;a href="https://leetcode.com/problems/jump-game/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/jump-game/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Best Time to Buy and Sell Stock: &lt;a href="https://leetcode.com/problems/best-time-to-buy-and-sell-stock/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/best-time-to-buy-and-sell-stock/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Gas Station: &lt;a href="https://leetcode.com/problems/gas-station/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/gas-station/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Minimum Number of Arrows to Burst Balloons: &lt;a href="https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Non-overlapping Intervals: &lt;a href="https://leetcode.com/problems/non-overlapping-intervals/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/non-overlapping-intervals/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Assign Cookies: &lt;a href="https://leetcode.com/problems/assign-cookies/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/assign-cookies/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Jump Game II: &lt;a href="https://leetcode.com/problems/jump-game-ii/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/jump-game-ii/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Lemonade Change: &lt;a href="https://leetcode.com/problems/lemonade-change/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/lemonade-change/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Queue Reconstruction by Height: &lt;a href="https://leetcode.com/problems/queue-reconstruction-by-height/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/queue-reconstruction-by-height/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Candy: &lt;a href="https://leetcode.com/problems/candy/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/candy/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;3. &lt;strong&gt;Two-Pointers - &lt;/strong&gt;Beginner&lt;/p&gt;

&lt;p&gt;Use two pointers to traverse an array or a linked list simultaneously.&lt;/p&gt;

&lt;p&gt;Practice:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Remove Duplicates from Sorted Array: &lt;a href="https://leetcode.com/problems/remove-duplicates-from-sorted-array/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/remove-duplicates-from-sorted-array/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Container With Most Water: &lt;a href="https://leetcode.com/problems/container-with-most-water/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/container-with-most-water/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Trapping Rain Water: &lt;a href="https://leetcode.com/problems/trapping-rain-water/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/trapping-rain-water/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Merge Two Sorted Lists: &lt;a href="https://leetcode.com/problems/merge-two-sorted-lists/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/merge-two-sorted-lists/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Remove Element: &lt;a href="https://leetcode.com/problems/remove-element/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/remove-element/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Squares of a Sorted Array: &lt;a href="https://leetcode.com/problems/squares-of-a-sorted-array/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/squares-of-a-sorted-array/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;3Sum: &lt;a href="https://leetcode.com/problems/3sum/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/3sum/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Backspace String Compare: &lt;a href="https://leetcode.com/problems/backspace-string-compare/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/backspace-string-compare/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Valid Palindrome: &lt;a href="https://leetcode.com/problems/valid-palindrome/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/valid-palindrome/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Longest Palindromic Substring: &lt;a href="https://leetcode.com/problems/longest-palindromic-substring/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/longest-palindromic-substring/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;4. &lt;strong&gt;Sliding Window&lt;/strong&gt; - Beginner&lt;/p&gt;

&lt;p&gt;Maintain a window of elements in an array or a string and move the window to find the solution. Combined with 2 pointers.&lt;/p&gt;

&lt;p&gt;Practice:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Longest Substring Without Repeating Characters: &lt;a href="https://leetcode.com/problems/longest-substring-without-repeating-characters/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/longest-substring-without-repeating-characters/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Minimum Size Subarray Sum: &lt;a href="https://leetcode.com/problems/minimum-size-subarray-sum/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/minimum-size-subarray-sum/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Longest Repeating Character Replacement: &lt;a href="https://leetcode.com/problems/longest-repeating-character-replacement/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/longest-repeating-character-replacement/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Permutation in String: &lt;a href="https://leetcode.com/problems/permutation-in-string/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/permutation-in-string/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Minimum Window Substring: &lt;a href="https://leetcode.com/problems/minimum-window-substring/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/minimum-window-substring/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Maximum Erasure Value: &lt;a href="https://leetcode.com/problems/maximum-erasure-value/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/maximum-erasure-value/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Fruit Into Baskets: &lt;a href="https://leetcode.com/problems/fruit-into-baskets/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/fruit-into-baskets/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Minimum Operations to Reduce X to Zero: &lt;a href="https://leetcode.com/problems/minimum-operations-to-reduce-x-to-zero/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/minimum-operations-to-reduce-x-to-zero/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Get Maximum in Generated Array: &lt;a href="https://leetcode.com/problems/get-maximum-in-generated-array/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/get-maximum-in-generated-array/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Subarrays with K Different Integers: &lt;a href="https://leetcode.com/problems/subarrays-with-k-different-integers/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/subarrays-with-k-different-integers/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;5. &lt;strong&gt;Backtracking&lt;/strong&gt; - Intermediate&lt;/p&gt;

&lt;p&gt;Systematically explore all possible solutions by building candidates and then abandoning them as soon as you determine that they cannot lead to a valid solution.&lt;/p&gt;

&lt;p&gt;Practice:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Letter Combinations of a Phone Number: &lt;a href="https://leetcode.com/problems/letter-combinations-of-a-phone-number/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/letter-combinations-of-a-phone-number/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Generate Parentheses: &lt;a href="https://leetcode.com/problems/generate-parentheses/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/generate-parentheses/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Combination Sum: &lt;a href="https://leetcode.com/problems/combination-sum/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/combination-sum/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Permutations: &lt;a href="https://leetcode.com/problems/permutations/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/permutations/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Word Search: &lt;a href="https://leetcode.com/problems/word-search/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/word-search/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Palindrome Partitioning: &lt;a href="https://leetcode.com/problems/palindrome-partitioning/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/palindrome-partitioning/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;N-Queens: &lt;a href="https://leetcode.com/problems/n-queens/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/n-queens/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Subsets: &lt;a href="https://leetcode.com/problems/subsets/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/subsets/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Combination Sum II: &lt;a href="https://leetcode.com/problems/combination-sum-ii/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/combination-sum-ii/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Restore IP Addresses: &lt;a href="https://leetcode.com/problems/restore-ip-addresses/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/restore-ip-addresses/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;6. &lt;strong&gt;Depth-First Search (DFS) - &lt;/strong&gt;Intermediate&lt;/p&gt;

&lt;p&gt;Traverse a graph or tree by exploring as far as possible along each branch before backtracking.&lt;/p&gt;

&lt;p&gt;Practice:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Invert Binary Tree: &lt;a href="https://leetcode.com/problems/invert-binary-tree" rel="noopener noreferrer"&gt;https://leetcode.com/problems/invert-binary-tree&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Binary Tree Inorder Traversal: &lt;a href="https://leetcode.com/problems/binary-tree-inorder-traversal" rel="noopener noreferrer"&gt;https://leetcode.com/problems/binary-tree-inorder-traversal&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Maximum Depth of Binary Tree: &lt;a href="https://leetcode.com/problems/maximum-depth-of-binary-tree" rel="noopener noreferrer"&gt;https://leetcode.com/problems/maximum-depth-of-binary-tree&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Symmetric Tree: &lt;a href="https://leetcode.com/problems/symmetric-tree" rel="noopener noreferrer"&gt;https://leetcode.com/problems/symmetric-tree&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Binary Tree Preorder Traversal: &lt;a href="https://leetcode.com/problems/binary-tree-preorder-traversal" rel="noopener noreferrer"&gt;https://leetcode.com/problems/binary-tree-preorder-traversal&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Path Sum: &lt;a href="https://leetcode.com/problems/path-sum" rel="noopener noreferrer"&gt;https://leetcode.com/problems/path-sum&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Kth Smallest Element in a BST: &lt;a href="https://leetcode.com/problems/kth-smallest-element-in-a-bst" rel="noopener noreferrer"&gt;https://leetcode.com/problems/kth-smallest-element-in-a-bst&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Lowest Common Ancestor of a Binary Search Tree: &lt;a href="https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree" rel="noopener noreferrer"&gt;https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Validate Binary Search Tree: &lt;a href="https://leetcode.com/problems/validate-binary-search-tree" rel="noopener noreferrer"&gt;https://leetcode.com/problems/validate-binary-search-tree&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Recover Binary Search Tree: &lt;a href="https://leetcode.com/problems/recover-binary-search-tree" rel="noopener noreferrer"&gt;https://leetcode.com/problems/recover-binary-search-tree&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;7. &lt;strong&gt;Bepth-First Search (BFS)&lt;/strong&gt; - Intermediate&lt;/p&gt;

&lt;p&gt;Traverse a graph or tree by exploring all the neighbors at the current level before moving on to the next level.&lt;/p&gt;

&lt;p&gt;Practice:&lt;/p&gt;

&lt;p&gt;You can practice the same as DFS and the following.&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Populating Next Right Pointers in Each Node: &lt;a href="https://leetcode.com/problems/populating-next-right-pointers-in-each-node" rel="noopener noreferrer"&gt;https://leetcode.com/problems/populating-next-right-pointers-in-each-node&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Populating Next Right Pointers in Each Node II: &lt;a href="https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii" rel="noopener noreferrer"&gt;https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Surrounded Regions: &lt;a href="https://leetcode.com/tag/breadth-first-search/#:~:text=130-,Surrounded%20Regions,-36.5%25" rel="noopener noreferrer"&gt;https://leetcode.com/tag/breadth-first-search/#:~:text=130-,Surrounded%20Regions,-36.5%25&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Number of Islands: &lt;a href="https://leetcode.com/problems/number-of-islands" rel="noopener noreferrer"&gt;https://leetcode.com/problems/number-of-islands&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Course Schedule: &lt;a href="https://leetcode.com/problems/course-schedule" rel="noopener noreferrer"&gt;https://leetcode.com/problems/course-schedule&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;8. &lt;strong&gt;Divide and Conquer - &lt;/strong&gt;Advanced&lt;/p&gt;

&lt;p&gt;Break down a problem into smaller sub-problems, solve each sub-problem independently, and then combine the solutions to get the final result.&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Maximum Subarray: &lt;a href="https://leetcode.com/problems/maximum-subarray/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/maximum-subarray/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Pow(x, n): &lt;a href="https://leetcode.com/problems/powx-n/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/powx-n/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Merge k Sorted Lists: &lt;a href="https://leetcode.com/problems/merge-k-sorted-lists/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/merge-k-sorted-lists/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Count of Smaller Numbers After Self: &lt;a href="https://leetcode.com/problems/count-of-smaller-numbers-after-self/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/count-of-smaller-numbers-after-self/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Find K Closest Elements: &lt;a href="https://leetcode.com/problems/find-k-closest-elements/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/find-k-closest-elements/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Majority Element: &lt;a href="https://leetcode.com/problems/majority-element/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/majority-element/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Unique Binary Search Trees: &lt;a href="https://leetcode.com/problems/unique-binary-search-trees/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/unique-binary-search-trees/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Kth Largest Element in an Array: &lt;a href="https://leetcode.com/problems/kth-largest-element-in-an-array/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/kth-largest-element-in-an-array/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Search for a Range: &lt;a href="https://leetcode.com/problems/search-for-a-range/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/search-for-a-range/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Closest Binary Search Tree Value II: &lt;a href="https://leetcode.com/problems/closest-binary-search-tree-value-ii/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/closest-binary-search-tree-value-ii/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;9. &lt;strong&gt;Dynamic Programming &lt;/strong&gt;- Advanced&lt;/p&gt;

&lt;p&gt;Break down a complex problem into smaller sub-problems and solve them individually. This approach can be used to solve problems that exhibit overlapping subproblems.&lt;/p&gt;

&lt;p&gt;Practice:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Climbing Stairs: &lt;a href="https://leetcode.com/problems/climbing-stairs/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/climbing-stairs/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Best Time to Buy and Sell Stock: &lt;a href="https://leetcode.com/problems/best-time-to-buy-and-sell-stock/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/best-time-to-buy-and-sell-stock/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Longest Increasing Subsequence: &lt;a href="https://leetcode.com/problems/longest-increasing-subsequence/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/longest-increasing-subsequence/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Coin Change: &lt;a href="https://leetcode.com/problems/coin-change/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/coin-change/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Maximum Subarray: &lt;a href="https://leetcode.com/problems/maximum-subarray/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/maximum-subarray/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;House Robber: &lt;a href="https://leetcode.com/problems/house-robber/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/house-robber/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Unique Paths: &lt;a href="https://leetcode.com/problems/unique-paths/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/unique-paths/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Decode Ways: &lt;a href="https://leetcode.com/problems/decode-ways/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/decode-ways/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Maximum Product Subarray: &lt;a href="https://leetcode.com/problems/maximum-product-subarray/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/maximum-product-subarray/&lt;/a&gt;
&lt;/li&gt;
    &lt;li&gt;Palindrome Partitioning II: &lt;a href="https://leetcode.com/problems/palindrome-partitioning-ii/" rel="noopener noreferrer"&gt;https://leetcode.com/problems/palindrome-partitioning-ii/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ol&gt;
  &lt;li&gt;I would suggest you start with some data structure basics, then solve around 20 easy questions to get an idea of the questions and their formatting&lt;/li&gt;
    &lt;li&gt;These are not all the patterns that exist, and the questions are not listed by difficulty. Each pattern might have variations or be combined with another one. By practicing you will get better.&lt;/li&gt;
    &lt;li&gt;The questions listed for practice might not be the most suitable ones, but you get the idea.&lt;/li&gt;
    &lt;li&gt;This list serves as a starting point for those who don't know how to get started. Follow the path or just create your own, "memento mori".&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
  </channel>
</rss>
