COMPSCI 1JC3 Chapter Notes - Chapter 8: Tree Traversal, Beaufort Scale, Bubble Sort

70 views2 pages

Document Summary

Each operation compares two adjacent elements of the sequence, and exchanges them if necessary, so the latter element is larger. The first pass moves the largest value to the last position. When solving a problem, there are two approaches. Top-down approach - breaking a problem down into several smaller subproblems. Bottom-up approach - starts from given data, known quantities and methods to build up components that are combined to achieve a particular task or problem solution. Stepwise refinement - focusing on the big picture and get the solution framework going correctly. Definition contains the same term or concept without being circular, by using base cases. Split array into two parts, smaller elements to the left and larger elements to the right. Partition operation - operation that picks any element of the array as the partition element. Quicksort reduces the length of sequences to be sorted quickly, and performs the reordering in place.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents