Awesome q2a theme
0 votes
43 views

Doubt: Is it really possible to write recurrence relation of for quick sort like it is given in

             the solution? if yes, then

             Please explain that how can one find the value of k in quick sort’s recurrence relation

              T(n)= T(n-k)+T(k-1)+cn in order to get the given recurrence relation in solution.

closed with the note: Doubt Cleared
in Algorithms by (788 points)
closed by | 43 views
+1
In the worst case, the pivot divides the list into 2 parts which are length 0 and length n-1 respectively.


In general, it is which you mentioned, but in worst case k=1 and here they mentioned choosing pivot itself takes O(n^2).
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Top Users 2020 Aug 10 - 16
  1. Arkaprava

    40 Points

  2. jayeshasawa001

    11 Points

  3. Nilabja Sarkar

    8 Points

  4. siddharths067

    4 Points

  5. 404 found

    3 Points

  6. shashankrustagi2021

    2 Points

  7. Ashutosh777

    2 Points

  8. Mellophi

    2 Points

  9. sparshgarg

    1 Points

  10. sonam13

    1 Points

Weekly Top User (excluding moderators) will get free access to GATE Overflow Test Series for GATE 2021
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Aug 2020
  1. Mellophi

    152 Points

  2. Ashutosh777

    78 Points

  3. anurag sharma

    48 Points

  4. Arkaprava

    40 Points

  5. jayeshasawa001

    16 Points

  6. Kushagra गुप्ता

    15 Points

  7. Shaik Masthan

    13 Points

  8. srestha

    13 Points

  9. shashankrustagi2021

    12 Points

  10. munishchaturvedi

    10 Points

7,745 questions
1,844 answers
11,188 comments
95,103 users