Unformatted text preview: p:=First(L) while (p<>END(L)) if(x = RETRIVE(p, L)) then DELETE(p, L); p:=NEXT(p,L); end time complexity is O(n). b) solution 1 procedure REMOVEALL(x:element, var L:LIST) var i,j:position begin i:=1; while (i<=L.last) and (x<>L.elements[i]) do i:=i+1; i:=i+1; while (i<=L.last) do 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