CSCI 2824 Study Guide - Comprehensive Final Exam Guide - Integer, Old Testament, Pigeonhole Principle

90 views120 pages

Document Summary

Predicate(n) the part of a sentence that expresses what is said about the subject. In the sentence the child threw the ball, the subject is. The child and the predicate is threw the ball. If max < ai, then max = ai. Procedure linearsearch (x, a1, a2, , an) i = 1. While (i <= n and x ai) i = i+1. If i <= n then location = i. Procedure binarysearch(x, a1, a2, , an) i = 1 # i is left endpoint of search interval j = n # j is right endpoint of search interval. While i < j m = (i+j)/2 # m is index of largest in left list. If x > am then location = i, else location = -1. Return location procedure bubblesort (a1, a2, , an) for i = q to n-1 for j = 1 to n-1.

Get access

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