Mme apko follow kr rha hu dsa k liyeee or ek path bhi mil rha tha but apka koi new video ni aya linkedlist pr please🙏 keep it up its very helpful for every student that who will learn dsa please🙏please keep it up
bhai pehle quesion mai jo public LIstNode .... likh rkkha hai usme ListNode pae to red line error dikha rkkha hai to kaise kru reply krdo solution hai to iska
@Apna College I think, we can eliminate 1st condition of (head.next==null) because for length of Linked list = 1, the condition (n==size) will do the the task, isn't it?
This helps me a lot ...could you plz upload videos on android as well....actually i am looking for a job in android- java...so some placement videos on android will help me.. Thank you
bhai pehle quesion mai jo public LIstNode .... likh rkkha hai usme ListNode pae to red line error dikha rkkha hai to kaise kru reply krdo solution hai to iska
I too noticed this....nd was searching if any of us had put up this doubt or nott...like am I the only one...or maybe I am wrong or nott..but I'm absolutely correct...thanks for raising the doubt... I appreciate
Code for removing cycle - public void removeCycle(Node head) { Node hare = head; Node tortoise = head; // Move hare and tortoise until they meet again (where the cycle starts) while (hare != null && hare.next != null) { hare = hare.next.next; tortoise = tortoise.next; // The point where both of them are at the same place (cycle starts) if (hare == tortoise) { // Move turtle to the head tortoise = head; // Move turtle and hare one step at a time until they meet again while (tortoise.next != hare.next) { tortoise = tortoise.next; hare = hare.next; } // Break the cycle by setting the next of the node where they meet to null hare.next = null; break; } }
i got admision in vit,srm and was able to clear sat 40000 rank in UPTU thats how i got my college But suffered from slip disc during jee-mains preparation
bhai pehle quesion mai jo public LIstNode .... likh rkkha hai usme ListNode pae to red line error dikha rkkha hai to kaise kru reply krdo solution hai to iska
Q.2) Check for palindrome. I did it with recursive solution as well. By this way time complexity remains O(n) but space complexity increases bcz of n number of calls in call stack. Here's the code, //Inside LinkedList class put these two methods and a static variable boolean isPalindrome(){ if(head==null || head.next==null){ return true; } checkPalindrome(head); boolean temp=isPalindrome; isPalindrome=true; return temp; } private static boolean isPalindrome=true; private Node checkPalindrome(Node current){ if(current==null){ return head; } Node start= checkPalindrome(current.next); if(current.data!=start.data){ isPalindrome=false; } return start.next; }
bhai loop hatane ka logic sahi nahi h... first find no. of nodes in loop (k). And marks 1st pointer to head and 2nd pointer after head by k times. Now move them 1 step each... they'll meet at that point.
@@chanakyasinfosphere Did you try to compile and run my code? Because I don't think so there is any mistake in my code! If you think my code is wrong so kindly comment below your solution😊
Be humble otherwise you will suffer losses due to lack of humility i had 12 backs but i cleared them its not engineering experience this is error clinged to ones mind
Didi ek C++ par video bana dijiye aap Basic ek shoot Oops ka ek shoot Pointer ka shoot Recursion ka shoot Please didi bana dijiye aap bahut achhey se Describe krte hai Basic data structure in c++ please didi
these were definitely not the most important questions of linkedlist, no doubt they are a part of important questions but there are more important questions out there for linkedlist
For the first question, What's wrong with my code??? import java.util.*; public class Solution { public static void main(String[] args) { LinkedList list_1 = new LinkedList(); for (int i=1;i
Didi best course nd best explanation please complete it♥️🔥.
The expression you gave me at the
beginning of this vedio is super amazing ---- I Like it ----- simple simple simple simple
😄
Mme apko follow kr rha hu dsa k liyeee or ek path bhi mil rha tha but apka koi new video ni aya linkedlist pr please🙏 keep it up its very helpful for every student that who will learn dsa please🙏please keep it up
i never forget the concept ... hare & turtle '😊 THANKYOU SO MUCH DI.
Thank you so much for this course please complete it ♥️♥️
Why my code is not running though I written correct
I wish I had such type of trainer and platform in my engineering days 20 years back. But nevertheless its never too late to begin something good.
bhai pehle quesion mai jo public LIstNode .... likh rkkha hai usme ListNode pae to red line error dikha rkkha hai to kaise kru reply krdo solution hai to iska
@@yashsoni8043 kaha pr aara h?
@@Aryannegi1807 ListNode pr (jb mam ne public ListNode likha to ListNode pe red line aa rhi hai )
Haa to sahi se pdhao
Or ache se kro ise dobara😂
Baki u r the sweetest or acha hi padhati ho❤
Difference between old study and modern , pahle coment krne p teacher gussa hote the aur ab khus🤔
Gussa tab hote the jab unke padhate time comment kro yaha pe padhane ke baad comment aate hain
@Georgian 😂
Please make a freelancing series ...how to make gig , how to deal with clients kindly make these videos
Thanks dear Aman bhaiya,
Your suggestions are ♾️ Valuable🤘🤘🤘
Mam pls continue java course 🙏🙏🙏🙏
16:47 .. the way did says "logic chahe ham kitna b bda bna le lrkinn space nagi use krenge computer ki"
Amazing guidelines 🤞
#Apna College & shradda didi rocks, god bless you & all 👍
It looks my interview questions need to be revised since the video perfectly covered them.
yaar yeh kitni awesome hai
@Apna College
I think, we can eliminate 1st condition of (head.next==null) because for length of Linked list = 1, the condition (n==size) will do the the task, isn't it?
Yep. I think so too.
No here we need the previous node to delete the node we want and for the head there no any previous node.
Literally made it easy........Hats off to you....
Define Main Function Karke
Heyy! Do update the answer to remove the loop soon. Btw crazy playlist. Loving it so far
This helps me a lot
...could you plz upload videos on android as well....actually i am looking for a job in android- java...so some placement videos on android will help me..
Thank you
1st question lineno. 28
There will not be i
bhai pehle quesion mai jo public LIstNode .... likh rkkha hai usme ListNode pae to red line error dikha rkkha hai to kaise kru reply krdo solution hai to iska
Mam, we are waiting for your new video to learn to cover all the things.
12:55 It should be size-n+1 instead of size -n-1
I too noticed this....nd was searching if any of us had put up this doubt or nott...like am I the only one...or maybe I am wrong or nott..but I'm absolutely correct...thanks for raising the doubt... I appreciate
Thank you for amazing videos can you please cover all java topics with dsa and dynamic programming 🙏
ye ques kha krti hn...didi?
@@abhijeetsaroha1902 Leetcode pe
teaching way is awesome
Allah Pak aap ko hamesha Salamat rakhe
ameen 👐
✧༺♥༻✧
Accessing `prev.next.next` without checking if `prev.next` is not null can lead to null pointer exceptions.
great channel for preparation for exams
Hare and Turtle explanation is the best one.
You have made DS easy.
excellent video i seen ever
🥰
Didi ap bahut achcha padhati hai, please python per 4 se 5 hours ka video banayiye .
Great lecture for me... thank you ma'am....
Code for removing cycle -
public void removeCycle(Node head) {
Node hare = head;
Node tortoise = head;
// Move hare and tortoise until they meet again (where the cycle starts)
while (hare != null && hare.next != null) {
hare = hare.next.next;
tortoise = tortoise.next;
// The point where both of them are at the same place (cycle starts)
if (hare == tortoise) {
// Move turtle to the head
tortoise = head;
// Move turtle and hare one step at a time until they meet again
while (tortoise.next != hare.next) {
tortoise = tortoise.next;
hare = hare.next;
}
// Break the cycle by setting the next of the node where they meet to null
hare.next = null;
break;
}
}
Would they meet where the loop starts or where the LL ends?
@@VigorousScope where the loop begins
i got admision in vit,srm and was able to clear sat 40000 rank in UPTU
thats how i got my college
But suffered from slip disc during jee-mains preparation
ruclips.net/video/AChFRpLhPlk/видео.html C language
get a pwd certificate.
@@AmitKumar-cp1oz nice 🙂
Very Helpful, making things simple to learn by the way of teaching
❣❣
bhai pehle quesion mai jo public LIstNode .... likh rkkha hai usme ListNode pae to red line error dikha rkkha hai to kaise kru reply krdo solution hai to iska
Please make a vedio on BTech +mba vs BBA+ MBA!!!!🙏🙏🙏
maam that friend's talk was very emotional
Please Microsoft ki eligibility and hiring process ke upar ek detailed video banaiye na. Please
Didi plz video bnayeeee topic beginner lvl k computer user jisko excel bhi nhi ata meri tarah 😅😅😅😅
THANK YOU SO MUCH DI😍😍😍 GREAT EXPLANATION..............☺😘
LeetCode ka sahi prayog...
great lecture..THANKYOU ....request you to please continue this amazing series.
33.30 --> Detection of Loop in a LinkedList
didi regular video upload karo please ....aise video agr upload karoge to bohot din lag jayega
Finding middle using size takes less time didi. size = 4ms and hare&turtle = 6ms
CDAC video 🔥🔥
🥇First one👌🤜
No bro you r late
Bhai coments krne aata hai ya padne
@@riteshgaharwar7822 both
Thanku didi for everything
what a great playlist thank you shradha didi
U r so awesome👏 love ❤❤❤u didi kash mere real Bhai ki jagha aap mere bhen hote and aman bhai mere bhai 🤧🤧🤧🤧
please upload more videos to cover all java, we are waiting please do it...
Best Video Apna College Rocks
For first question If u just want to print then isn't that
indextosearch=size-n+1 ?
yep
you're right
yes bro we shoud write size-n+1 instead of size-n-1
please also make tutorials for doubly, circular linkedList
Pls upload videos regularly. Pls pls I am waiting
when n==size , head can't be removed and answer is whole list
41:41 ma'am should have used
| | instead of && 😅
Q.2) Check for palindrome. I did it with recursive solution as well. By this way time complexity remains O(n) but space complexity increases bcz of n number of calls in call stack. Here's the code,
//Inside LinkedList class put these two methods and a static variable
boolean isPalindrome(){
if(head==null || head.next==null){
return true;
}
checkPalindrome(head);
boolean temp=isPalindrome;
isPalindrome=true;
return temp;
}
private static boolean isPalindrome=true;
private Node checkPalindrome(Node current){
if(current==null){
return head;
}
Node start= checkPalindrome(current.next);
if(current.data!=start.data){
isPalindrome=false;
}
return start.next;
}
@ Apna College can you please tell me that should I apply this method in an interview/placement ?
Didi question ko dekh ke variable kaise ye analysis krna bhi btaya kre apne video me plzzz
42:58
/*
Solution of Removing cycle...
☝🏼But first, we have to make a cycle...*/
// make cycle
void makeCycle(Node head, int pos){
Node temp=head;
Node startNode=null;
int cnt=1;
while(temp.next!=null){
if(cnt==pos){
startNode=temp;
}
temp=temp.next;
cnt++;
}
temp.next=startNode;
}
// remove cycle
void removeCycle(Node head){
Node turtle=head;
Node hare=head;
do{
turtle=turtle.next;
hare=hare.next.next;
}while(hare!=turtle);
//Corner case: If cycle starts from head.
if(hare==head){
while(turtle.next!=head){
turtle=turtle.next;
}
turtle.next=null;
return;
}
hare=head;
while(hare.next!=turtle.next){
hare=hare.next;
turtle=turtle.next;
}
turtle.next=null;
}
Thanks bro
bhai loop hatane ka logic sahi nahi h... first find no. of nodes in loop (k). And marks 1st pointer to head and 2nd pointer after head by k times. Now move them 1 step each... they'll meet at that point.
@@chanakyasinfosphere Did you try to compile and run my code? Because I don't think so there is any mistake in my code!
If you think my code is wrong so kindly comment below your solution😊
I feel difficulty in built logic in
Programming.
Java is my first language i want to be good in it...but how?
In second question there should be (here!= null not here.next.next!=null)
3rd quetion me 41:48 par you shoukd write fast.next!=null && fast.next.next!=null instead of fast!=null && fast.next!=null
ye ho sakta hai??
@@AnadiHirpara same doubtt...that shraddha may have mistaken it...u r correct
mam please upload the video for Removing the loop in a LinkedList
Ques no 1 :-
if(n==size){
return head.next;
}
but fir vv 1,2,3,4,5 print ho rha hai jbki 2,3,4,5 hona chahiye tha????
Hn bhai same mera v🥲🥲
if(n==size){
head=head.next;
return head;
}
use this
Be humble otherwise you will suffer losses due to lack of humility
i had 12 backs but i cleared them
its not engineering experience
this is error clinged to ones mind
please didi make video fast please,and you are doing amzing .
Didi ek C++ par video bana dijiye aap
Basic ek shoot
Oops ka ek shoot
Pointer ka shoot
Recursion ka shoot
Please didi bana dijiye aap bahut achhey se Describe krte hai
Basic data structure in c++ please didi
Please make a video on Java android development course
mam , we can solve it using collection framework as well to make it more convenient ,, than why from scratch method
Thank you didi
Thanks ❤️
Didi circular & double linked list kab karayoge ?
Didi plz make c language course 🙏🏻🙏🏻🙏🏻
Removing Loops in a Linked List.
Didi Need video plz
Didi please explain in short to cut the loop.
Change the editor or compiler
Question 1 - 01:43
Question 2 - 13:13
Question 3 - 28:36
Can't thank you all enough....!!!!
Just wanted to say, maine bhi 7 baje uthna shuru kara hai✊
so i did the question of removing the loop. it worked fine but when it removes the loop, it deletes the node connecting to the meeting point.
Please update the answer of removing list in notes!
😄
these were definitely not the most important questions of linkedlist, no doubt they are a part of important questions but there are more important questions out there for linkedlist
Plz do upload the solution for loop detection and removal
Why not using collection frameworks?
Didi please make a video on python.
Did do pace up the series
Also python kabse?? 😅😅
nicely say 👏 ! didi
Hn Didi ek python ke liye bhi playlist banay
Please make video on AVL tree
Dear Mam,
2nd Question Palindrome mein reverse function samaj mein nai aaya
Muskil hai leakin na mumkin nhin no PC and laptop but which your videos
Can u pls start Java you tube dsa problem solving and explaination course in java
please cover all other DSA in java
For the first question, What's wrong with my code???
import java.util.*;
public class Solution {
public static void main(String[] args) {
LinkedList list_1 = new LinkedList();
for (int i=1;i
in linked list you cannot pick an element from anywhere and remove it I too tried but failed miserably.
bhai ye array hai, not LL
Didi please make a review video on NIT Jalandhar. 🙏
tell me which code editor do you use please
Hello
can you make some hardcore programming videos ?
didi palindromic vala que doubly linkedlist se asan se kar sakte hena
maam just a doubt collection framework se karne se nahi hoga kya?