Click here to Skip to main content
15,891,529 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Russell'29-Aug-07 9:02
Russell'29-Aug-07 9:02 
AnswerRe: Substring Matching (Harder than it sounds) Pin
PIEBALDconsult29-Aug-07 18:03
mvePIEBALDconsult29-Aug-07 18:03 
AnswerRe: Substring Matching (Harder than it sounds) Pin
Mark Churchill29-Aug-07 18:26
Mark Churchill29-Aug-07 18:26 
AnswerRe: Substring Matching (Harder than it sounds) Pin
cp987629-Aug-07 23:55
cp987629-Aug-07 23:55 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Skippums30-Aug-07 4:04
Skippums30-Aug-07 4:04 
AnswerRe: Substring Matching (Harder than it sounds) Pin
Skippums4-Sep-07 11:23
Skippums4-Sep-07 11:23 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Luc Pattyn4-Sep-07 13:06
sitebuilderLuc Pattyn4-Sep-07 13:06 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Skippums4-Sep-07 13:26
Skippums4-Sep-07 13:26 
It is slightly more difficult, though, because the time it takes depends on the data. For example, if the longest substring matches immediately and is longer than half the length of the shorter substring, then it takes only O(n) time. If none of the charaters from either string match, it also only takes O(n) time. If the smaller string is shorter than the minimum result you are willing to accept, it takes O(1) time to inform me that I am an idiot for trying. I would like to test it for the worst case senario, but I am having trouble figuring out what that is. Anyone have any insight to a case when this will perform worse than O(n)?
GeneralRe: Substring Matching (Harder than it sounds) Pin
Luc Pattyn5-Sep-07 9:00
sitebuilderLuc Pattyn5-Sep-07 9:00 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Skippums5-Sep-07 10:46
Skippums5-Sep-07 10:46 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Member 419459329-Mar-08 9:55
Member 419459329-Mar-08 9:55 
QuestionNeed some intelligent people... Pin
Paddy Boyd29-Aug-07 2:20
Paddy Boyd29-Aug-07 2:20 
AnswerRe: Need some intelligent people... Pin
Luc Pattyn29-Aug-07 2:56
sitebuilderLuc Pattyn29-Aug-07 2:56 
GeneralRe: Need some intelligent people... Pin
Paddy Boyd29-Aug-07 3:42
Paddy Boyd29-Aug-07 3:42 
GeneralRe: Need some intelligent people... Pin
Paddy Boyd29-Aug-07 3:55
Paddy Boyd29-Aug-07 3:55 
GeneralRe: Need some intelligent people... Pin
Luc Pattyn29-Aug-07 4:42
sitebuilderLuc Pattyn29-Aug-07 4:42 
GeneralRe: Need some intelligent people... Pin
Paddy Boyd29-Aug-07 4:44
Paddy Boyd29-Aug-07 4:44 
AnswerRe: Need some intelligent people... Pin
Russell'29-Aug-07 4:54
Russell'29-Aug-07 4:54 
AnswerRe: Need some intelligent people... Pin
cp987629-Aug-07 16:18
cp987629-Aug-07 16:18 
GeneralRe: Need some intelligent people... Pin
Luc Pattyn29-Aug-07 23:41
sitebuilderLuc Pattyn29-Aug-07 23:41 
QuestionGenetic Algorithm Pin
starist26-Aug-07 4:58
starist26-Aug-07 4:58 
AnswerRe: Genetic Algorithm Pin
Russell'26-Aug-07 22:08
Russell'26-Aug-07 22:08 
QuestionCOMBINATION Pin
Heljeeve22-Aug-07 23:36
Heljeeve22-Aug-07 23:36 
AnswerRe: COMBINATION Pin
Giorgi Dalakishvili22-Aug-07 23:51
mentorGiorgi Dalakishvili22-Aug-07 23:51 
AnswerRe: COMBINATION Pin
Russell'23-Aug-07 0:04
Russell'23-Aug-07 0:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.