Remove all occurences of duplicates in a linked list | gfg potd 03 July| GFG Problem OF The Day
Вставка
- Опубліковано 26 сер 2024
- 518 Days of Code- 03rd July GeeksForGeeks Problem Of The Day - JAVA
ALL CP/DSA RESOURCES : linktr.ee/aksh...
Asked in Google - • D-381 Find the String ...
Interview Experience Playlist - • Brillio Software Devel...
Leetcode Interview preparation - • LeetCode 136. Single N...
GFG POTD - • D-334 Number Of Enclav...
Topics Wise
----------------------------------------------
Bitwise - • D-468 Gray to Binary e...
Recursion and BackTracking - • Lec-1 What is Recursio...
Binary Trees - • What is a Binary Tree ?
Binary Search Tree - • Floor in BST | DSA S...
Graphs - • Day 312/365 - Print ad...
Dynamic Programming - • What is Dynamic Progra...
Disjoint Set - • D-452 Possible Paths i...
Trie - • D-415 Insert and Searc...
Heaps - • DAY 25 Longest Perfect...
Arrays - • Day-401Maximum Meeting...
Number Theory - • 204. Count Primes - (A...
Use code for 10% off on GFG : "AKSHAYS10"
practice.geeks...
----------------------------------------------
Reference Videos
1. Time complexity Logic of 10^8 -constraint analysis
• Trick the TLE | How t...
GitHub: github.com/Aks...
Follow 👉DSA repository - github.com/Aks...
Practice Link - www.geeksforge...
Source code - github.com/Aks...
You can follow me on below platforms for all the latest updates
----------------------------------------------
LinkedIn - / akshay-a-26672a172
Twitter - / akshay_anil_
Instagram
/ code_with_akshay
/ itzz_aksh_yay
Show Support
----------------------------------------------
UA-cam: / @akshayanil0-1
Telegram : t.me/+cEa2twkS...
Happy Coding 🤝.
.
.
"Join me daily as we tackle the #ProblemOfTheDay from #GeeksforGeeks! Enhance your skills in #DataStructures and #Algorithms with our comprehensive #DSA tutorials. Perfect for those preparing for #CodingInterviews and looking to ace their #TechJobs. Dive into #CodingProblems, #CompetitiveProgramming, and #CodeChallenges with solutions in #C++/#Java/#Python. Stay ahead in your #InterviewPrep and #SoftwareEngineering journey. Don't miss out on our #CodingPractice sessions designed to help you master #DataStructuresAndAlgorithms. Follow for daily insights and tips on #Leetcode, #Hackerrank, and #Codeforces problems. #Programming #Coding #AlgorithmSolutions #CodeDaily."
#GFG #POTD #geeksforgeeks #problemoftheday #java
#AkshayAnil #dsa #code_with_akshay #dsa_with_akshay #dsasheet #programming #leetcodesolutions #gfg #gfgpotd #problemsolving #coding #softwareengineer #faang #amazon #microsoft #competitiveprogramming #dsasheet #interviewpreparation
thanks
public Node removeDuplicate(Node head){
Node dummy=new Node(-1),cur=dummy;
while(head!=null){
int x=0;
while(head!=null&&head.next!=null&&head.data==head.next.data){
x=head.next.data;
head=head.next.next;
}
if(head!=null&&x!=head.data){
cur.next=new Node(head.data);
cur=cur.next;
}
if(head!=null)
head=head.next;
}
return dummy.next;
}
🎉❤