Problem

12 views
Skip to first unread message

Muhammad Rafay Abdullah

unread,
May 12, 2013, 8:17:18 AM5/12/13
to cs1003-s...@googlegroups.com
Assalam u alikum:
                          Sir/mam please explain these lines. I think these two conditions will always be true.

  if (left < rightArrow)

   QuickSort(list, left, rightArrow);

  if (leftArrow < right)

   QuickSort(list, leftArrow, right);

Sami Ullah Kashif

unread,
May 12, 2013, 8:21:15 AM5/12/13
to cs1003-s...@googlegroups.com
Walaikum Assalam
                             How can they be always true? For every recursive call, we send new values of left and right variables. So for every recursive call the size of the list decreases till the size is just 1 when this function call would return.

Regards,
Sami
Reply all
Reply to author
Forward
0 new messages