<?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: Md Mahfuz Hossain</title>
    <description>The latest articles on DEV Community by Md Mahfuz Hossain (@mdmahfuzbipu).</description>
    <link>https://dev.to/mdmahfuzbipu</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%2F1227324%2F135b20b1-9e87-4d25-8d68-0bce62d12af9.jpg</url>
      <title>DEV Community: Md Mahfuz Hossain</title>
      <link>https://dev.to/mdmahfuzbipu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mdmahfuzbipu"/>
    <language>en</language>
    <item>
      <title>How to Get IntelliJ IDEA Ultimate for Free as a Student</title>
      <dc:creator>Md Mahfuz Hossain</dc:creator>
      <pubDate>Sat, 15 Feb 2025 07:46:57 +0000</pubDate>
      <link>https://dev.to/mdmahfuzbipu/how-to-get-intellij-idea-ultimate-for-free-as-a-student-55e3</link>
      <guid>https://dev.to/mdmahfuzbipu/how-to-get-intellij-idea-ultimate-for-free-as-a-student-55e3</guid>
      <description>&lt;p&gt;Hello everyone, I'm &lt;strong&gt;Mahfuz Hossain&lt;/strong&gt;, a student of &lt;strong&gt;Information and Communication Engineering&lt;/strong&gt; from &lt;strong&gt;BAUET&lt;/strong&gt;, &lt;strong&gt;Bangladesh&lt;/strong&gt;. As a Java learner, I recently explored different IDEs for Java and found out that students can access IntelliJ IDEA Ultimate for free, but how? I want to share this information with you.&lt;/p&gt;

&lt;p&gt;If you’re learning &lt;strong&gt;Java&lt;/strong&gt; or planning to work on &lt;strong&gt;Enterprise Java projects&lt;/strong&gt;, you’ve probably heard about &lt;strong&gt;IntelliJ IDEA Ultimate&lt;/strong&gt;. It’s one of the best IDEs for Java development, offering powerful features for Spring Boot, Microservices, and advanced debugging. However, the Ultimate edition comes with a paid subscription.&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;Good news!&lt;/strong&gt; JetBrains offers IntelliJ IDEA Ultimate for free to students through its Student License Program. If you have an &lt;strong&gt;edu email&lt;/strong&gt;, you can access this premium IDE without paying a dime!&lt;/p&gt;

&lt;p&gt;In this guide, I’ll walk you through the &lt;strong&gt;step-by-step process&lt;/strong&gt; of getting IntelliJ IDEA Ultimate for free as a student.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Check Eligibility
&lt;/h3&gt;

&lt;p&gt;To qualify for the &lt;strong&gt;JetBrains Student License&lt;/strong&gt;, you must be:&lt;/p&gt;

&lt;p&gt;✔ A &lt;strong&gt;student&lt;/strong&gt; at an accredited institution.&lt;br&gt;
✔ Have an &lt;strong&gt;edu email&lt;/strong&gt; (e.g., &lt;a href="mailto:yourname@university.edu"&gt;yourname@university.edu&lt;/a&gt;)&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Apply for the JetBrains Student License
&lt;/h3&gt;

&lt;p&gt;Visit the &lt;strong&gt;JetBrains Student License page&lt;/strong&gt;:&lt;br&gt;
🔗&lt;a href="https://www.jetbrains.com/community/education/#students" rel="noopener noreferrer"&gt;https://www.jetbrains.com/community/education/#students&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Scroll down below and Click "&lt;strong&gt;Apply Now&lt;/strong&gt;" under the &lt;strong&gt;Students&lt;/strong&gt; section.&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%2Fubz44rf70qk5n62l5g7f.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%2Fubz44rf70qk5n62l5g7f.png" alt="Apply Now Section" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fill up the fields and Sign in with your &lt;strong&gt;university email&lt;/strong&gt; e.g., &lt;a href="mailto:yourname@university.edu"&gt;yourname@university.edu&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%2Fv4angoddlecc0iizbt5v.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%2Fv4angoddlecc0iizbt5v.png" alt="JAVA IDE" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After Completing, Click on the &lt;strong&gt;Apply For Free Products&lt;/strong&gt; option below. And you will be redirected to this page.&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%2Fq6snebmd4l3aqxyp7v3k.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%2Fq6snebmd4l3aqxyp7v3k.png" alt="Thank you page" width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After this, JetBrains will &lt;strong&gt;send a verification link&lt;/strong&gt; to your inbox. Open it and confirm your email.&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%2Fd0h6iphhmq9kr6r118ul.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%2Fd0h6iphhmq9kr6r118ul.png" alt="ACTIVATE" width="800" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once verified, your &lt;strong&gt;free JetBrains license&lt;/strong&gt; will be activated within minutes! 🎉&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Download and Activate IntelliJ IDEA Ultimate
&lt;/h3&gt;

&lt;p&gt;1.Go to the &lt;strong&gt;IntelliJ IDEA download page&lt;/strong&gt;:🔗 &lt;a href="https://www.jetbrains.com/idea/download" rel="noopener noreferrer"&gt;https://www.jetbrains.com/idea/download&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.Download &lt;strong&gt;IntelliJ IDEA Ultimate&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;3.Install and launch the IDE.&lt;/p&gt;

&lt;p&gt;After installing you will be prompted for activation.&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%2F94ulpkluhlh978bfip2h.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%2F94ulpkluhlh978bfip2h.png" alt="JAVA IDE" width="800" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on &lt;strong&gt;Activate License&lt;/strong&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%2Fdjzf5nu2lmxz2ihapeq4.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%2Fdjzf5nu2lmxz2ihapeq4.png" alt="SIGN IN WITH JETBRAIN ACCOUNT" width="800" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sign in with the &lt;strong&gt;JetBrains account&lt;/strong&gt; that has the &lt;strong&gt;student license&lt;/strong&gt; you got earlier.&lt;/p&gt;

&lt;p&gt;And after entering the credentials, you will see the below page:&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%2Fkm74siaygrmwz0g5vk5v.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%2Fkm74siaygrmwz0g5vk5v.png" alt="CONGO" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🎉 Congratulations! You now have IntelliJ IDEA Ultimate for free!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of IntelliJ IDEA Ultimate for Students
&lt;/h3&gt;

&lt;p&gt;💡 &lt;strong&gt;Advanced Features&lt;/strong&gt;: Refactoring, database tools, Spring, and more.&lt;br&gt;
📌 &lt;strong&gt;Web Development&lt;/strong&gt;: JavaScript, TypeScript, and frontend frameworks support.&lt;br&gt;
🔍 &lt;strong&gt;Debugging &amp;amp; Profiler&lt;/strong&gt;: Powerful debugging tools to optimize performance.&lt;br&gt;
🤖 &lt;strong&gt;AI-Powered Assistance&lt;/strong&gt;: IntelliJ Ultimate provides better code completion and suggestions.&lt;/p&gt;

&lt;p&gt;👉 Connect with me on &lt;a href="https://www.linkedin.com/in/muhammadmahfuzhossain/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; ✨&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💬 Did this guide help you? Let me know in the comments!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>java</category>
      <category>development</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Intro to Git &amp; GitHub: add files into your repository</title>
      <dc:creator>Md Mahfuz Hossain</dc:creator>
      <pubDate>Mon, 01 Apr 2024 15:23:00 +0000</pubDate>
      <link>https://dev.to/mdmahfuzbipu/intro-to-git-github-add-files-into-your-repository-k8p</link>
      <guid>https://dev.to/mdmahfuzbipu/intro-to-git-github-add-files-into-your-repository-k8p</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hi everyone, I'm Mahfuz Hossain, a student of Information and Communication Engineering from Bangladesh.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Git is a popular distributed version control system&lt;br&gt;
 that provides a robust framework for managing and organizing code repositories, while GitHub, a web-based hosting service, offers a platform for hosting Git repositories. It's a popular choice among developers for code hosting and collaboration.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;In this article, I'm going to show you step by step how to create, add and push files to your project in GitHub.&lt;/strong&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;To initialize the repo and push it to GitHub, you’ll need:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://github.com/" rel="noopener noreferrer"&gt;A free GitHub Account&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git-scm.com/downloads" rel="noopener noreferrer"&gt;git installed on your local machine&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 1 — Create a new GitHub Repo
&lt;/h2&gt;

&lt;p&gt;Sign in to your GitHub account and create a &lt;a href="https://github.com/new" rel="noopener noreferrer"&gt;new repository&lt;/a&gt;.Give your project name into the repository name.&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%2Fs1mg08htjmjqir7zzey6.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%2Fs1mg08htjmjqir7zzey6.png" alt="adding new repository" width="712" height="821"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 - Initialize the Git Repo
&lt;/h2&gt;

&lt;p&gt;Open terminal, go to the folder you would like to add.Make sure you are in the root directory of the project you want to push to GitHub and run: &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: If you already have an initialized Git repository, you can skip this command.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a hidden .git directory in your project folder&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 - Add the files to the Git index for commit
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;replace &lt;em&gt;filename&lt;/em&gt; with your file &lt;br&gt;
The git add command will tell git which files to include in a commit. A commit is a basically check-point that captures the changes you have made to the files in your repository.&lt;/p&gt;

&lt;p&gt;Instead of this, you can also run &lt;code&gt;git add .&lt;/code&gt; if you want to add all the files at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4 - Commit Added Files
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m 'added myproject'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This git commit command creates a commit, and the &lt;em&gt;-m&lt;/em&gt; flag allows you to provide a &lt;em&gt;commit message&lt;/em&gt; that describes the purpose or context of the changes made in the commit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5 -Add a new remote origin
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote add origin git@github.com:username/myProject.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command establishes a connection between your local Git repository(your PC) and a remote repository(the server) hosted on GitHub.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6 - Push to GitHub
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push -u origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt; It sends the local commits(from your pc) and changes to the remote repository(github server).&lt;/li&gt;
&lt;li&gt; &lt;em&gt;-u&lt;/em&gt; sets the upstream branch, linking the local "main" branch to the remote "main" branch. This allows you to simply use &lt;code&gt;git push&lt;/code&gt; in the future without specifying the branch and remote.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  All together
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git init
git add &amp;lt;filename&amp;gt;
git commit -m 'added myproject'
git remote add origin git@github.com:username/myProject.git
git push -u origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congratulations! Now you are all set to track your file, code changes remotely in GitHub!&lt;br&gt;
You can take additional help from the official &lt;a href="https://git-scm.com/docs/gittutorial" rel="noopener noreferrer"&gt;Git resources.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That's all from me. Good luck with your Git journey!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>githubactions</category>
    </item>
    <item>
      <title>Implementation of Linked Lists in C++ and Python</title>
      <dc:creator>Md Mahfuz Hossain</dc:creator>
      <pubDate>Tue, 20 Feb 2024 23:30:55 +0000</pubDate>
      <link>https://dev.to/mdmahfuzbipu/implementation-of-linked-lists-in-c-and-python-43e7</link>
      <guid>https://dev.to/mdmahfuzbipu/implementation-of-linked-lists-in-c-and-python-43e7</guid>
      <description>&lt;p&gt;Hi everyone, I'm Mahfuz Hossain, a student of Information and Communication Engineering from Bangladesh. In this article, I'm going to talk about Linked Lists in C++ and Python. Mainly I'll show you the implementation part step by step of Linked Lists in this article.  &lt;/p&gt;

&lt;p&gt;A linked list is a linear data structure which can store a collection of "nodes" connected together via links i.e. pointers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LinkedList representation:&lt;/strong&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%2Fznkxuo894c26rg108jix.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%2Fznkxuo894c26rg108jix.png" alt="LinkedList" width="800" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For theoretical part you can visit &lt;a href="https://www.w3schools.com/dsa/dsa_theory_linkedlists.php" rel="noopener noreferrer"&gt;here&lt;/a&gt;  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Implementation of Linked List in C++&lt;/strong&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Step one: Defining Node Class
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Node
{
public:
  int data;
  Node *next;

  //constructor
  Node(int data)
  {
    this-&amp;gt;data=data;
    this-&amp;gt;next=nullptr;
  }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, at the first step I created a class &lt;em&gt;Node&lt;/em&gt; which has two member &lt;em&gt;data&lt;/em&gt; for storing the value of the node and &lt;em&gt;next&lt;/em&gt; for storing the address of another node.&lt;br&gt;
After that, I created a &lt;em&gt;Node&lt;/em&gt; constructor which initializes the member variables &lt;em&gt;data&lt;/em&gt; and &lt;em&gt;next&lt;/em&gt; by using &lt;em&gt;this&lt;/em&gt; pointer. To know more about the use of &lt;em&gt;this&lt;/em&gt; pointer in C++ you can visit &lt;a href="https://www.javatpoint.com/cpp-this-pointer" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;
  
  
  Step two: Creating and connecting Nodes
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//creating the nodes
Node *head;
Node *node1=new Node(3);
Node *node2=new Node(7);

//connecting the nodes

head=node1;  
node1-&amp;gt;next=node2;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That's it! We have created the linked list! Now let's understand the code.&lt;/p&gt;

&lt;p&gt;Here at first we created the &lt;em&gt;head&lt;/em&gt; node and after that two node objects by dynamically allocating their memory using &lt;em&gt;new&lt;/em&gt; operator and assigned their addresses to &lt;em&gt;node1&lt;/em&gt; and &lt;em&gt;node2&lt;/em&gt;. &lt;br&gt;
To know more about &lt;em&gt;new&lt;/em&gt; operator in C++ visit &lt;a href="https://www.javatpoint.com/difference-between-new-and-delete-operator-in-cpp" rel="noopener noreferrer"&gt;here&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%2Fpkzzqvu4w9rbrqy0c9w1.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%2Fpkzzqvu4w9rbrqy0c9w1.png" alt="head and two nodes" width="800" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And later on, assigned the address of &lt;em&gt;node2&lt;/em&gt; to the &lt;em&gt;next&lt;/em&gt; member variable of &lt;em&gt;node1&lt;/em&gt;. It established the link between &lt;em&gt;node1&lt;/em&gt; and &lt;em&gt;node2&lt;/em&gt;. Also made the &lt;em&gt;node1&lt;/em&gt; as the &lt;em&gt;head&lt;/em&gt; of the linked list.&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%2Fnxw06y6ohb8vrgp7m7yv.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%2Fnxw06y6ohb8vrgp7m7yv.png" alt="connecting head and nodes" width="800" height="228"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Step three: Printing the linked list
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void printList(Node *node)
{
  while(node != NULL)
  {
    cout&amp;lt;&amp;lt;node-&amp;gt;data&amp;lt;&amp;lt;" -&amp;gt; ";
    node=node-&amp;gt;next;
  }
  cout&amp;lt;&amp;lt;"NULL";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;the printList function takes pointer as an argument. The while loop will print all the nodes until it encounters an empty node. Inside the while loop the &lt;em&gt;node&lt;/em&gt;=&lt;em&gt;node&lt;/em&gt;-&amp;gt;&lt;em&gt;next&lt;/em&gt; will update the node in each iteration and it will make the node traverse through the entire list. &lt;/p&gt;
&lt;h5&gt;
  
  
  &lt;u&gt;At the start of the while loop:&lt;/u&gt;
&lt;/h5&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%2F53scm8uuprnpn8k2tuhr.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%2F53scm8uuprnpn8k2tuhr.png" alt="at the start of the loop node is at firs Node" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5&gt;
  
  
  &lt;u&gt;After the first iteration&lt;/u&gt;:
&lt;/h5&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%2Fop94cnj8c9hieyaq91a3.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%2Fop94cnj8c9hieyaq91a3.png" alt="After first iteration node is at Second Node" width="800" height="501"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  So the final code will be:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;iostream&amp;gt;

using namespace std;

class Node
{
public:
  int data;
  Node *next;

  //constructor
  Node(int data)
  {
    this-&amp;gt;data=data;
    this-&amp;gt;next=nullptr;
  }
};

void printList(Node *node)
{
  while(node != NULL)
  {
    cout&amp;lt;&amp;lt;node-&amp;gt;data&amp;lt;&amp;lt;" -&amp;gt; ";
    node=node-&amp;gt;next;
  }
  cout&amp;lt;&amp;lt;"NULL";
}

int main()
{
//creating the nodes
 Node *head;
 Node *node1= new Node(3);
 Node *node2= new Node(7);
 Node *node3= new Node(11);


 //connecting the nodes
 head=node1;
 node1-&amp;gt;next=node2;
 node2-&amp;gt;next=node3;

printList(head);

//free the memory
delete head;
delete node1;
delete node2;
delete node3;

return 0;

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;here at the last part I deallocated the memory using &lt;em&gt;delete&lt;/em&gt; operator to avoid memory leaks. To know more about delete operator you can visit &lt;a href="https://www.javatpoint.com/difference-between-new-and-delete-operator-in-cpp" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The output will be:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3 -&amp;gt; 7 -&amp;gt; 11 -&amp;gt; NULL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;that's all for C++ now it's time for Python&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%2Fsd1d3xdw6oo12yjpmpt7.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%2Fsd1d3xdw6oo12yjpmpt7.png" alt="Python Logo" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Implementation of Linked List in Python&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Python is broadly known for it's simplicity, here it is no different when it comes to implementing a Linked list in Python.  &lt;/p&gt;

&lt;h4&gt;
  
  
  Step one: Creating Node class
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Node:
 def __init__(self,data):
   self.data=data
   self.next=None
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here &lt;strong&gt;init&lt;/strong&gt; is a constructor of the class which initializes the data attribute with the provided data argument and sets next to None. To know more about constructor in Python visit &lt;a href="https://www.geeksforgeeks.org/__init__-in-python/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step two: Creating and connecting nodes
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node1=Node(3)
node2=Node(7)
node3=Node(11)

//connecting the nodes
node1.next=node2
node2.next=node3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here I created three Node objects and then connected each node to point to the next node in the desired order. &lt;/p&gt;

&lt;h4&gt;
  
  
  Step three: Printing the list
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def printList(node):
 while node != None:
   print(node.data," -&amp;gt; ",end="")
   node=node.next
 print("None")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So here it will traverse through the list and print the value till the last node. After the last will the &lt;em&gt;node&lt;/em&gt; will be assigned the value None and the loop will exit.&lt;/p&gt;

&lt;h5&gt;
  
  
  So the final Python code will be:
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Node:
    def __init__(self, data):
        self.data = data
        self.next = None

def printList(node):
 while node != None:
   print(node.data," -&amp;gt; ",end="")
   node=node.next
 print("None")

node1=Node(3)
node2=Node(7)
node3=Node(11)

//connecting the nodes
node1.next=node2
node2.next=node3

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3 -&amp;gt; 7 -&amp;gt; 11 -&amp;gt; None
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's all from me. Hope this blog was helpful to you. If you have any comments or feedback about this article, please share them. Additionally, I would be happy to provide any assistance or answer any questions you may have regarding the content. Thank you. &lt;/p&gt;

</description>
      <category>dsa</category>
      <category>python</category>
      <category>linkedlist</category>
      <category>cpp</category>
    </item>
  </channel>
</rss>
