This preview shows page 1. Sign up to view the full content.
Unformatted text preview: by procedure find1 (i.e. the straightforward algorithm)? How many character comparisons are required by procedure find2 (i.e. the KMP algorithm)? Using find 1 a b b b a b b a a b b a b a a b a b a a b a a b a a b a b b a b b b a b b a # pass1 a b a 3 pass2 a 1 pass3 a 1 pass4 a 1 pass5 a b a 3 pass6 a 1 pass7 a 1 pass8 a b 2 pass9 a b a 3 pass10 a 1 pass11 a 1 pass12 a b a a b a a 7 pass13 a 1 pass14 a b 2 pass15 a b a a 4 pass16 a 1 pass17 a b a a b a a b a b 10 pass18 a 1 pass19 a b 2 pass20 a b a a b a a b a b 10 56...
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
 janicki

Click to edit the document details