User:J.smith/pseudocode
Appearance
DiffList[?, 3] // List of [oldID][Date][User] for page in question
PagesLeft = Length of DiffList[]-1 // Total pages left in question
PageNumberToCheck = PagesLeft/2 // Pointer to where we are at in the list, initialized to middle
PageToCheck // The page that needs to be checked
IsFound = TRUE // TRUE/FALSE return for if LastPageChecked had string
SearchString // String of text we are searching for
CheckPage(page, string) // Checks page for string and return boolean true if found (uses Qurey.php to grab wikimarkup and does a search/find for the string (to be writen))
While (PagesLeft > 2) // If PagesLeft is more than 2 then keep searching.
PageToCheck = DiffList[PageNumberToCheck, 0]
IsFound = CheckPage(PageToCheck, SearchString)
PagesLeft = PagesLeft/2
If (IsFound = TRUE) //If "checkpage" resulted in a "positive"
PageNumberToCheck = PageNumberToCheck - (PageLeft/2)
Else //If "checkpage" resulted in a "negitive"
PageNumberToCheck = PageNumberToCheck + (PagesLeft/2)
Return (LastPageChecked)