Click here to Skip to main content
15,916,091 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Two become one... Pin
Kevnar31-Jan-07 18:17
Kevnar31-Jan-07 18:17 
QuestionGENETIC ALGORITHM FOR BUS ROUTE NETWORK DESIGN, help me Pin
DHIRAJ SHETI7-Dec-06 17:57
DHIRAJ SHETI7-Dec-06 17:57 
AnswerRe: GENETIC ALGORITHM FOR BUS ROUTE NETWORK DESIGN, help me Pin
karam chandrabose8-Dec-06 5:35
karam chandrabose8-Dec-06 5:35 
GeneralRe: GENETIC ALGORITHM FOR BUS ROUTE NETWORK DESIGN, help me Pin
dead_link8-Dec-06 8:37
dead_link8-Dec-06 8:37 
GeneralRe: GENETIC ALGORITHM FOR BUS ROUTE NETWORK DESIGN, help me Pin
Dan Neely8-Dec-06 9:16
Dan Neely8-Dec-06 9:16 
GeneralRe: GENETIC ALGORITHM FOR BUS ROUTE NETWORK DESIGN, help me Pin
DHIRAJ SHETI8-Dec-06 19:14
DHIRAJ SHETI8-Dec-06 19:14 
GeneralRe: GENETIC ALGORITHM FOR BUS ROUTE NETWORK DESIGN, help me Pin
DHIRAJ SHETI8-Dec-06 19:10
DHIRAJ SHETI8-Dec-06 19:10 
Questionfirst occurence of multiple search terms in a string Pin
peterchen5-Dec-06 16:55
peterchen5-Dec-06 16:55 
I have a set of strings (seach terms) and a data string, and I'm loking for the first occurence of one of the search terms in the data string.

(Brute force: try each string at each char, until one match is found O(n^2))

Modification:
I have a map(string org, string new) with string replacements, and a data string. In data, replace all occurences of "org" by "new".

(Brute force: assuming that org and new strings don't overlap, do a string.replacealloccurences(org,new) for each replacement pair)

Are there any better approaches than the brute force?



Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers!
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
Linkify!|Fold With Us!

AnswerRe: first occurence of multiple search terms in a string Pin
Frank Kerrigan5-Dec-06 23:30
Frank Kerrigan5-Dec-06 23:30 
GeneralRe: first occurence of multiple search terms in a string Pin
peterchen6-Dec-06 1:21
peterchen6-Dec-06 1:21 
AnswerRe: first occurence of multiple search terms in a string Pin
Bassam Abdul-Baki6-Dec-06 8:27
professionalBassam Abdul-Baki6-Dec-06 8:27 
AnswerRe: first occurence of multiple search terms in a string Pin
szukuro7-Dec-06 1:02
szukuro7-Dec-06 1:02 
AnswerRe: first occurence of multiple search terms in a string Pin
ricecake7-Dec-06 3:22
ricecake7-Dec-06 3:22 
AnswerRe: first occurence of multiple search terms in a string Pin
A.A.7-Dec-06 3:28
A.A.7-Dec-06 3:28 
GeneralRe: first occurence of multiple search terms in a string Pin
peterchen9-Dec-06 3:05
peterchen9-Dec-06 3:05 
AnswerRe: first occurence of multiple search terms in a string Pin
Harald Krause11-Dec-06 4:33
Harald Krause11-Dec-06 4:33 
Questionfingerprint recognition algorithm Pin
Alex19823-Dec-06 20:41
Alex19823-Dec-06 20:41 
AnswerRe: fingerprint recognition algorithm Pin
Bradml4-Dec-06 0:47
Bradml4-Dec-06 0:47 
AnswerRe: fingerprint recognition algorithm Pin
Frank Kerrigan4-Dec-06 3:07
Frank Kerrigan4-Dec-06 3:07 
GeneralRe: fingerprint recognition algorithm Pin
Paul Conrad5-Dec-06 11:30
professionalPaul Conrad5-Dec-06 11:30 
AnswerRe: fingerprint recognition algorithm Pin
Tal Even-Tov8-Dec-06 9:40
Tal Even-Tov8-Dec-06 9:40 
Questionproblem in algorithm!! Pin
CHELA FE3-Dec-06 16:16
CHELA FE3-Dec-06 16:16 
AnswerRe: problem in algorithm!! Pin
Are Jay3-Dec-06 17:52
Are Jay3-Dec-06 17:52 
AnswerRe: problem in algorithm!! Pin
David Crow5-Dec-06 4:56
David Crow5-Dec-06 4:56 
QuestionPolygon Union/intersect Pin
rpz27-Nov-06 8:29
rpz27-Nov-06 8:29 

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.