Pseudo Code | Merge Sort | Data Structure & Algorithm | Appliedcourse

Поділитися
Вставка
  • Опубліковано 31 січ 2025

КОМЕНТАРІ • 9

  • @vibewithritsy
    @vibewithritsy 4 роки тому +1

    Well done sir💥

  • @mayanalashy1137
    @mayanalashy1137 Рік тому +2

    ahh it is complicated

  • @LAGsubham
    @LAGsubham 5 років тому

    Sir please make full algorithm series

  • @akhil4380
    @akhil4380 3 роки тому +1

    what if array size is odd, how can we do split for getting divide array?

    • @nisharathod2945
      @nisharathod2945 3 роки тому +2

      for odd length array we will have unequal partition, say len=9 then p+q=10, floor of 10 is 5, so we will have one group of 4 elements and other of 5 elements, correct me if I am wrong

    • @akhil4380
      @akhil4380 3 роки тому +2

      @@nisharathod2945 thanks 😁

  • @prashanttrivedi6005
    @prashanttrivedi6005 3 роки тому

    What is the significance of adding infinity in the end of an array in merge sort

    • @guest9472
      @guest9472 3 роки тому +1

      Take
      A=[1,2,3,4]
      B=[5,6,7,8]
      and apply the merge function,
      you will understand it.

    • @nayab.rasool22
      @nayab.rasool22 Рік тому

      It acts as an endmarker indicating that the array is completed and you can copy the other array without any comparison as it is already sorted