CSE 214 Study Guide - Final Guide: Merge Sort, Big O Notation

121 views3 pages

Document Summary

Cse 214: study guide sorts: heap and counting. Basically converts and array into a heap (usually a max heap) and then removes the max element from the heap and places it in an array. Since the value removed is always the max value, the array will hold the biggest value descending starting from the back of the array. (depends on implementation). The heap will reheapify and the max element will be removed again. Another example: a little bit easier to understand. 1. the entire array is put into a heap. 8: the maximum element is removed from the heap and is placed inside the array accordingly. (the yellow element is no longer in the heap and is in position 8). The heap is then created again excluding the 95. Basically takes an array a of integers and creates an array count that ranges from 0 to the biggest integer value.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers

Related Documents

Related Questions