How to remove duplicates from the sorted array?🧐.

Поделиться
HTML-код
  • Опубликовано: 9 ноя 2024

Комментарии • 56

  • @gamifycoding8927
    @gamifycoding8927 2 года назад +50

    Very easy to understand ...
    After explaining , kindly display the coding also sir

  • @muskanpatel4347
    @muskanpatel4347 4 месяца назад +1

    Superb explanation 👌👌

  • @ajtodream1935
    @ajtodream1935 Год назад +1

    presentation was super cool

  • @jaweher.s
    @jaweher.s 7 месяцев назад

    Great explanation thanks

  • @nithya6361
    @nithya6361 Год назад +3

    After seeing your videos, I'm Addicted to coding which I never liked before..

  • @bharadwaj25
    @bharadwaj25 Год назад +1

    Very nice explanation

  • @kotlaarunkumar4251
    @kotlaarunkumar4251 Месяц назад

    Wooooow

  • @sbharathi3394
    @sbharathi3394 3 месяца назад +1

    Okay this logic ok when you don't need output in ordered way.. means 112234 ->1234 ..but what if input is 123231..will get unordered output ->321 ...but actual order we want is-> 123

  • @u1isgreat365
    @u1isgreat365 2 года назад +2

    You are really great bro

  • @Randomboy-g4w
    @Randomboy-g4w Год назад

    simplest ans is store the array in map and display .first because map always gives the unique values( by the way nice way of teaching )

    • @God_is_great_786
      @God_is_great_786 11 месяцев назад

      its better to use set

    • @loner0750
      @loner0750 3 месяца назад

      Time complexity and space complexity increases if we use set or map

  • @testingvinod9545
    @testingvinod9545 Месяц назад

    This will only work if duplicate is just the next one what about duplicates are at random index ?

  • @ATULKUMAR-ep8sw
    @ATULKUMAR-ep8sw Год назад

    Very nice

  • @semiprolific774
    @semiprolific774 Год назад +1

    This helped me think through a problem for my job… and I feel like it was quite helpful.
    Thanks, dude in the video!!

  • @u1isgreat365
    @u1isgreat365 2 года назад +1

    I am your fan

  • @arjunreddy7013
    @arjunreddy7013 2 года назад +2

    What if the duplicate value is a different index like one is 2 index and second one is Last index so how can compare these different index values

  • @AliAkbar-bz8zz
    @AliAkbar-bz8zz 2 года назад +3

    What happens if the last element was 1 instead of 5🤔

    • @malayacharya4055
      @malayacharya4055 2 года назад +4

      It's a sorted array, so the last element has to be 4 or more than 4.

  • @sumitkumar-nz4gd
    @sumitkumar-nz4gd Год назад +2

    What if 2 and 2 are not present adjacent to each other same for 4 ,4

  • @fahadabdulla2068
    @fahadabdulla2068 2 года назад

    Thanks bro ☺️

  • @ssjsjswkke1390
    @ssjsjswkke1390 Год назад

    But ar2 will have 2 spaces left so garbage value will occupy it!!!!! So how to avoid this problem?! Please answer 😅❤

  • @vedantkadu
    @vedantkadu Год назад

    simply perform XOR operstion

  • @BloodMist46a
    @BloodMist46a Год назад +1

    How to remove without using extra space?

    • @SaraswathiSaraswathi-ul9dm
      @SaraswathiSaraswathi-ul9dm Год назад

      he has explained it fully in this video ruclips.net/video/I0vmCnkcGW4/видео.html

    • @Omhange
      @Omhange 10 месяцев назад

      using hashmap

    • @BloodMist46a
      @BloodMist46a 10 месяцев назад

      Hashmaps Will take o(n) Space complexity

  • @codeheaven4073
    @codeheaven4073 2 года назад +7

    This is only for the sorted array… please correct your title or say in video that it works only for sorted array

  • @jishnupdileep3143
    @jishnupdileep3143 2 года назад

    👏🏻

  • @mohammedmujahidabbas3030
    @mohammedmujahidabbas3030 2 месяца назад

    What if 1 duplicate is at last it doesn't work

  • @abhinandans
    @abhinandans Год назад +1

    Source code..

  • @whatsappfunnyvideo516
    @whatsappfunnyvideo516 2 года назад

    We can solve Without using Additional array

    • @05c38
      @05c38 Год назад

      How bro

  • @dhanajidongare1514
    @dhanajidongare1514 2 года назад +1

    Please tell me how to remove duplicate from {1,2,2,3,1,4,4} this array...

  • @ogive3602
    @ogive3602 Год назад +1

    Sir aapki movement mujhe ladki ki tarah kyu lag rahi hai 👀🥲

  • @proeditz108
    @proeditz108 11 месяцев назад +6

    Agar dublicate item 2nd or 5th position per ho to ye trick ki to waat lag jaegi
    😂😂
    Like comment for ans

    • @Rahmat-ws8lu
      @Rahmat-ws8lu 10 месяцев назад +1

      are bhain sorted array hota hain sahi se padhle

    • @keshavpriyam4583
      @keshavpriyam4583 10 месяцев назад

      You'll have to sort the array before you find unique elements

  • @divyeshparmar4809
    @divyeshparmar4809 Год назад

    nij padariya ne tamari chatvi chhe

  • @TakshPethani
    @TakshPethani 11 месяцев назад

    gujrati ma bolne bhai indian thai english ne mahtv deso jay rajiv dixit

  • @yt_user685
    @yt_user685 Год назад +1

    What if in case of 1 2 2 3 2 4 4 5 ?😂

  • @sasi11889
    @sasi11889 Год назад

    Pgm pls

  • @dheerajparmar824
    @dheerajparmar824 2 года назад +1

    But what if there is a duplicate element occuring more than 1 Time?

  • @Sarath17
    @Sarath17 Год назад +3

    Here's my c++ code:
    #include
    using namespace std;
    int main()
    {
    int arr[]={1,2,3,5,5,6,7,7,8};//sort it before delete duplicates
    vector v;
    int j=0;
    for(int i=0;i

  • @PavanKumar-vv7qd
    @PavanKumar-vv7qd 2 года назад +1

    wrong explanation

  • @paula19335
    @paula19335 Год назад +1

    Where is the code??