Unformatted text preview: 1 ) end end if (p 1 <> END(L 1 ) or p 2 <> END(L 2 )) then return(true) else return(false) end 5. Give, using A big O @ notation, the worst case running times of the following procedures as a function of n. Provide some calculation/justification. Just a formula only is not sufficient. a. procedure P1(n:integer); var i,j,k : integer; /* assume arrays are such that access error never occurs*/ begin for i:=1 to n do if ( (n is not odd) and (n is not divided by 5)) then begin...
View Full Document
This note was uploaded on 12/10/2009 for the course CAS 2c03 taught by Professor Janicki during the Spring '03 term at McMaster University.
- Spring '03