Sorting2.0 - Quick-Sort Tree An execution of quick-sort is...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Quick-Sort Tree An execution of quick-sort is depicted by a binary tree Each node represents a recursive call of quick-sort and stores Unsorted sequence before the execution and its pivot Sorted sequence at the end of the execution The root is the initial call The leaves are calls on subsequences of size 0 or 1 CSE 2011 Prof. J. Elder - 51 - Last Updated: 4/1/10 11:16 AM Execution Example Pivot selection CSE 2011 Prof. J. Elder - 52 - Last Updated: 4/1/10 11:16 AM Execution Example (cont.) Partition, recursive call, pivot selection CSE 2011 Prof. J. Elder - 53 - Last Updated: 4/1/10 11:16 AM Execution Example (cont.) Partition, recursive call, base case CSE 2011 Prof. J. Elder - 54 - Last Updated: 4/1/10 11:16 AM Execution Example (cont.) Recursive call, …, base case, join CSE 2011 Prof. J. Elder - 55 - Last Updated: 4/1/10 11:16 AM ...
View Full Document

Ask a homework question - tutors are online