Remove Duplicates From Sorted Linked List

Sdílet
Vložit
  • čas přidán 26. 12. 2017
  • Remove Duplicates From Unsorted Linked List. This works for multiple occurrences.
    Remove Duplicates (2 occurrences) video :- • Remove duplicate ( 2 o...
    Github code :- github.com/vivekanand44/codes...

Komentáře • 40

  • @samarthbhandari1360
    @samarthbhandari1360 Před 6 lety +11

    You're doing a fantastic job! Keep it up! You have helped me tackle my personal fear of working with linked lists

  • @eng6070
    @eng6070 Před 2 lety

    best teaching ever sir! very clear explanation with detailed coding, thank you very much sir, it help me a lot!

  • @dipteshdeore5207
    @dipteshdeore5207 Před 3 lety +1

    You teach in very simple method 🔥... awesome !!

  • @srafayal
    @srafayal Před rokem

    god bless you sir you have a versatile way of teaching

  • @AbhishekJain-pm2jn
    @AbhishekJain-pm2jn Před 2 lety +1

    Very well explained sir 👏👌

  • @FrozenByTheSun
    @FrozenByTheSun Před 6 lety

    I love the way you stress function names :D
    «Remove duplicates» is the name of the function ☝🏽» - 1:05

  • @ahmedouyahya
    @ahmedouyahya Před 4 lety +1

    Thank you sooooo much, it was very clear.

  • @dhanashreerajeshwar823

    hi sir, you really explain very well.

  • @LocNguyen-ky6bn
    @LocNguyen-ky6bn Před 4 lety

    so useful for those beginners like me. Thank you so much

  • @randeeprana5622
    @randeeprana5622 Před 4 lety

    thanku so much bro for clearing this topic

  • @minakshisingh1314
    @minakshisingh1314 Před 5 lety +6

    Here is the simple code
    node * removeDuplicates(node * root)
    {
    // Your code here
    node * current = root;
    while(current != null && current->next != null)
    {
    if(current->data == current->next->data)
    current->next = current->next->next;
    else
    current = current->next;
    }
    return root;
    }

  • @afjalsharifopu5058
    @afjalsharifopu5058 Před 6 lety

    just awsome.....

  • @sonalisharma8915
    @sonalisharma8915 Před 6 lety

    very informative :)

  • @maggie02683
    @maggie02683 Před 5 lety +2

    THANK U SO MUCHHHHHHHHHHHHHHHHHHHHHHHH i feel so stupid for not being able to solve this on my own but ur videos are amazing so THANK U

  • @saktiranjanbehera7010
    @saktiranjanbehera7010 Před 4 lety

    Thanks a ton.

  • @grigtrig9804
    @grigtrig9804 Před 5 lety +1

    Can you please upload a video in which the case is to delete all occurrences of a given key in a Singly and Doubly linked list

  • @brijdi07
    @brijdi07 Před 4 lety

    Really good explanation. But there is one issue, we are not deallocating memory for the node which gets removed.

  • @jaysahu357
    @jaysahu357 Před 6 lety

    nice sir

  • @shivakrishna6393
    @shivakrishna6393 Před 6 lety

    sir can u please explain the complete code (including main() function)with execution

  • @penikmatteater1785
    @penikmatteater1785 Před 4 lety

    If the function is not void, which will be returned? head or p?

  • @younsineda1105
    @younsineda1105 Před 3 lety

    Sir , what if they told us to return the element that has the maximum occurrence and the number of apparition in a list ? . I hope u''ll answer me .
    Thanks in advance

  • @ranioctaviani5320
    @ranioctaviani5320 Před 4 lety

    Thank u

  • @dimpleshah3037
    @dimpleshah3037 Před 3 lety

    Osm.... Sir pls upload code in python too....

  • @subhranil_mukherjee
    @subhranil_mukherjee Před 6 lety +1

    Welcome back sir 🙂
    Btw the function name shouldn't have a '*', otherwise nice explanation as usual.

  • @hemaladani4510
    @hemaladani4510 Před 4 lety

    Super

  • @surajtopal9940
    @surajtopal9940 Před 4 lety

    Thanks sir jii

  • @NatureBeauty1202-R
    @NatureBeauty1202-R Před 6 lety

    sir OPTIMISATION ALGO pe vdo kijiye

  • @abheejitjadhav9405
    @abheejitjadhav9405 Před 4 lety

    the node which are unlinking should be memory leak... you should free that memory

  • @FrozenByTheSun
    @FrozenByTheSun Před 6 lety

    Subbed

  • @devanshsolani2711
    @devanshsolani2711 Před 4 lety

    Bhai ye ek question ke liye 20 min kaun dalega?

  • @RigzenBodhK_CO_
    @RigzenBodhK_CO_ Před 4 lety

    why didn't you delete the node

  • @gajjar04akash
    @gajjar04akash Před 5 lety

    You forgot to free the node memory.

  • @syedshahabuddin5567
    @syedshahabuddin5567 Před 6 lety

    You are not freeing that duplicate data using free function...

  • @user-wy6ju5ul7n
    @user-wy6ju5ul7n Před 4 lety

    اتمنى لو يكون في ترجمه للشرح بالعربي

  • @user-wy6ju5ul7n
    @user-wy6ju5ul7n Před 4 lety

    Sorry I thought you were speaking Hindi

  • @vedavyasa9542
    @vedavyasa9542 Před 6 lety

    Simplest solution(JAVA)
    ListNode curr = head;
    while(curr!=null && curr.next!= null){
    if(curr.val == curr.next.val){
    curr.next = curr.next.next;
    }else{
    curr = curr.next;
    }
    }