Awesome q2a theme
0 votes

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 (729 points)
closed by | 13 views
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
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Jan 2020
  1. shashin

    1163 Points

  2. Vimal Patel

    306 Points

  3. Deepakk Poonia (Dee)

    305 Points

  4. Debapaul

    237 Points

  5. Satbir

    192 Points

  6. SuvasishDutta

    137 Points

  7. Pratyush Priyam Kuan

    118 Points

  8. tp21

    108 Points

  9. DukeThunders

    96 Points

  10. pranay562

    95 Points

Monthly Top User and those within 60% of his/her points will get a share of monthly revenue of GO subject to a minimum payout of Rs. 500. Current monthly budget for Top Users is Rs. 75.
2,989 questions
1,509 answers
89,814 users