This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: many of the characters match. Otherwise, we proceed as in the previous case. The rst two cases take O(1) plus the time for the recursion. For the third case, when comparing equal characters L s is increased by one. The total number of comparisons if equal chars cant be larger than  P  . The number of other comparisons in the last case is O (1) per level of recursion. Hence the running time of O (  P  + log  T  ) 1 MIT OpenCourseWare http://ocw.mit.edu 6.851 Advanced Data Structures Spring 2010 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms ....
View
Full
Document
This note was uploaded on 03/31/2011 for the course EECS 6.851 taught by Professor Erikdemaine during the Spring '10 term at MIT.
 Spring '10
 ErikDemaine
 Data Structures

Click to edit the document details