Open thafnhlong opened 2 years ago
p1=> (pointer to ll ).next if(p1==null) return false; p2=> p1.next; if (p2==null) return false; while(p1 != null && p2!=null && p2->next != null){ if(p1==p2) return true p1=p1.next; p2=p2.next.next; }
return false
p1=> (pointer to ll ).next if(p1==null) return false; p2=> p1.next; if (p2==null) return false; while(p1 != null && p2!=null && p2->next != null){ if(p1==p2) return true p1=p1.next; p2=p2.next.next; }
return false