CS 2305 Lecture 13: CS 2305 Lecture 13

51 views3 pages

Document Summary

Definitions the cardinality of seta is equal to set b if andonly if there is a. B correspondence from a to b one to one. Countable a cardinality of the set that is either finite or has the same set of positive integer 2. Ci g th element or entry of a is called element a oh am. 780850 an algorithm is finite sequence of precise instructions for computation or for solving a problem. Ex finding a maximum element in an array. Algorithm as setmax gothrough elements of array tupdate max. 4 finite pseudocode for max procedure maxca az. Max _a for 1 2 to n if a max then max a return max pseudocode for searchlocate an element elements ai. az dn in an array of distinct procedure search cx integer a az. 125 4511 5 n och worst case"s else. 11havenotfound x jumped out of array locations 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
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents