CSE 205 Study Guide - Midterm Guide: List Of Data Structures, Search Tree, Dynamic Array

266 views34 pages
15 Sep 2018
School
Course
Professor

Document Summary

Quick sort: the quick sort uses divide and conquer to gain the same advantages as the merge sort, while not using additional storage, a quick sort first selects a value, which is called the pivot value. Although there are many different ways to choose the pivot value, we will simply use the first item in the list. The role of the pivot value is to assist with splitting the list. It will find the split point and at the same time move other items to the appropriate side of the list, either less than or greater than the pivot value. The first pivot value for a quick sort: partitioning begins by locating two position markers let"s call them leftmark and rightmark at the beginning and end of the remaining items in the list (positions 1 and 8 in figure 13).