Sorting Techniques - Algorithms | MCQ's (Detailed Solutions) For All Computer Science Exams| ADA

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

КОМЕНТАРІ •

  • @___vijay___
    @___vijay___ 4 роки тому +13

    Question 1: Both Selection & Bubble takes n-1 iterations

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

    I want more videos like this, l am benifited throughout this learning processes....and also lots of thanks to you and your team.

  • @Raj-ql2vz
    @Raj-ql2vz 3 роки тому +6

    Sir bubble sort also takes (n-1) iterations /passes to sort an array it's not n .
    And in bubble sort after each pass largest element moves to last position.
    Let's consider array as [5 4 3 2 1]
    After Pass 1- 4 3 2 1 5
    After Pass 2- 3 2 1 4 5
    After Pass 3- 2 1 3 4 5
    After Pass 4 - 1 2 3 4 5
    So here no. Of passes are 4 so,at max it takes (n-1) passes not n.

  • @chiranjeeviambeeru
    @chiranjeeviambeeru 3 місяці тому

    Very good... Questions

  • @javi2082
    @javi2082 4 роки тому +10

    Bubble Sort is a stable sort algorithm, Quick ain't.

    • @sohelansari-dq5kv
      @sohelansari-dq5kv 3 роки тому +1

      yes answer will be quick sort.....sir plz check the question no.-6 once...

  • @vaibhavpawar7322
    @vaibhavpawar7322 3 роки тому +9

    Which is not Stable sorting Algorithm?
    Ans:Quick Sort

  • @ByteDesk
    @ByteDesk 3 роки тому +4

    Please improve Q 6 answer instead of bubble sort it is a Quick sort

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

    Good explanation sir thanku

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

    Que9: Answer should be Quick sort, in question they mentioned clearly that best for Array, so answer should be Quick sort

  • @HewanShrestha
    @HewanShrestha 2 роки тому +2

    Q.N.6) The answer should be Quick Sort right? The question is to choose unstable sorting algorithm.

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

    It's helpful.......:)

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

    Thanks sir g....

  • @venip9106
    @venip9106 4 роки тому

    I always support u sir pls make more videos like this

  • @Raj-ql2vz
    @Raj-ql2vz 3 роки тому +3

    Qno 6. Which is not stable sorting algo ?
    Ans is quick sort .not bubble sort.
    Only quick sort and selection sort are unstable rest all are stable sorting algo ,but even quick and selection sort also be made stable.

  • @lavanyareddy1806
    @lavanyareddy1806 2 роки тому

    Question 6 quick sort is an answer because it is an unstable sort remaining all stable sorts

  • @Burn_Andbuild
    @Burn_Andbuild 2 роки тому

    Bubble sort n-1 iteration
    Selection sort n iteration

  • @bowlof__happiness1348
    @bowlof__happiness1348 2 роки тому +1

    Question no 6 ....Ans is -C (Quick Sort)

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

    sir you disussed in ine of your video
    if a={2,3,4,5,6}
    then bubble sort will take=O(1)
    but here discussing o(n*2) ??? please explain

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

      bro one loop for iteration and one for swaping

    • @BhaskarSinghBhakuni
      @BhaskarSinghBhakuni 4 місяці тому

      If the array is sorted then it can be detected in the first iteration only with the help of flag variable that will be the BEST CASE scenario for bubble sort with the time complexity of O(n)
      But if the array is sorted in reversed order which is the WORST CASE scenario for bubble sort taking the time complexity of O(n^2)

  • @sumitgore7730
    @sumitgore7730 4 роки тому

    Great sir👍

  • @atifhu
    @atifhu 4 роки тому

    Helpful..

  • @aprajitaverma7914
    @aprajitaverma7914 4 роки тому

    Question no 6asked for not stable sorting algorithm ,and u explained for stable.

  • @entertainworld7244
    @entertainworld7244 4 роки тому

    Sir....dynamic allocation is possible via malloc function... Is it correct sir

  • @amishasingh4093
    @amishasingh4093 2 роки тому

    Question 6 quick sort is not stable bubble sort is stable sir

  • @Uitean
    @Uitean 10 місяців тому

    Nice

  • @venip9106
    @venip9106 4 роки тому

    Super sir

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

    More question on sorting and hashing plz

  • @rgayathri7657
    @rgayathri7657 Рік тому

    Sir I think 6th question answer may be quick sort sir

  • @deepikadagarharyana9125
    @deepikadagarharyana9125 2 роки тому

    Aque. 6th me not stable poocha hai sir ,aap bata rhe ho bubble sort stable h

    • @ArihantOnlineAcademy
      @ArihantOnlineAcademy  2 роки тому +1

      Bubble sort is a stable sorting algorithm. This means that if there are multiple elements with the same value, their relative order will be preserved after the sort. For example, if the original array is [5, 2, 5, 1], a stable sort will result in [1, 2, 5, 5], while an unstable sort might result in [1, 5, 2, 5].
      In contrast, an unstable sort is a sorting algorithm that may change the relative order of elements with equal values. An example of an unstable sort is selection sort.

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

    Question 6 answer is quick sort sir..they asked not stable

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

    Sir question 6 answer is wrong it is quick sort

  • @karthikaunnikrishnan9866
    @karthikaunnikrishnan9866 6 місяців тому

    6 ans is quick sort

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

    ❤️

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

    Question 5 is wrong ans should be quick sort