COMPENG 2SI4 Lecture 2: Math Review and Binary Search

68 views3 pages

Document Summary

Ordered arrangement of a number of objects. If there are n distinct elements there are n! The modulus function returns the remainder after dividing two integer. Say we have 10 modulo 8 this gives an answer of 2. In java this operation is written as 10%8. The above series diverges as n goes to infinity but it can be shown that: And therefore we can say that the series diverges logarithmically as n approaches infinity. Sum of consecutive numbers raised to the same power. Given an array of elements that is already in memory. Given a search key that is of the same type as the elements in the array. Find the element in the array, if any, that matches the search key. Compare the search key to each element in the array. Move sequentially from the beginning towards the end. Continue to iterate through the loop until a match is found or the array has ended.

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

Related Questions