Click here to Skip to main content
15,887,746 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Need cut optimization algorith Pin
xx77abs14-Sep-09 3:21
xx77abs14-Sep-09 3:21 
GeneralRe: Need cut optimization algorith Pin
harold aptroot14-Sep-09 3:39
harold aptroot14-Sep-09 3:39 
AnswerRe: Need cut optimization algorith Pin
IdUnknown14-Sep-09 5:46
IdUnknown14-Sep-09 5:46 
GeneralRe: Need cut optimization algorith Pin
xx77abs14-Sep-09 6:50
xx77abs14-Sep-09 6:50 
QuestionSearch for repeated character combinations algorithm Pin
khalidelmeknesi9-Sep-09 2:31
khalidelmeknesi9-Sep-09 2:31 
AnswerRe: Search for repeated character combinations algorithm Pin
Richard MacCutchan9-Sep-09 3:01
mveRichard MacCutchan9-Sep-09 3:01 
GeneralRe: Search for repeated character combinations algorithm Pin
khalidelmeknesi9-Sep-09 20:50
khalidelmeknesi9-Sep-09 20:50 
AnswerRe: Search for repeated character combinations algorithm Pin
Luc Pattyn9-Sep-09 12:23
sitebuilderLuc Pattyn9-Sep-09 12:23 
Hi,

here is some idea:
1. read all text into a single string (File.ReadAllText)

2. have a main loop traversing the text, and get the substring with length 2

3. now call recursive method that uses String.IndexOf to locate and count extra occurences of that substring

4. when found, for each of them increase substring length by 1 and recurse to 3


side-effects: aaaa will be reported as three overlapping "aa" and two overlapping "aaa"

Smile | :)

Luc Pattyn

Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.


GeneralRe: Search for repeated character combinations algorithm Pin
khalidelmeknesi11-Sep-09 0:38
khalidelmeknesi11-Sep-09 0:38 
GeneralRe: Search for repeated character combinations algorithm Pin
Luc Pattyn11-Sep-09 1:14
sitebuilderLuc Pattyn11-Sep-09 1:14 
GeneralRe: Search for repeated character combinations algorithm [modified] Pin
khalidelmeknesi16-Sep-09 22:46
khalidelmeknesi16-Sep-09 22:46 
GeneralRe: Search for repeated character combinations algorithm Pin
Luc Pattyn17-Sep-09 2:05
sitebuilderLuc Pattyn17-Sep-09 2:05 
GeneralRe: Search for repeated character combinations algorithm Pin
khalidelmeknesi17-Sep-09 2:18
khalidelmeknesi17-Sep-09 2:18 
GeneralRe: Search for repeated character combinations algorithm Pin
Luc Pattyn17-Sep-09 3:31
sitebuilderLuc Pattyn17-Sep-09 3:31 
AnswerRe: Search for repeated character combinations algorithm [modified] Pin
Moreno Airoldi12-Sep-09 4:40
Moreno Airoldi12-Sep-09 4:40 
AnswerRe: Search for repeated character combinations algorithm Pin
Member 419459314-Sep-09 7:04
Member 419459314-Sep-09 7:04 
Question[Message Deleted] Pin
kabirbdboy8-Sep-09 23:35
kabirbdboy8-Sep-09 23:35 
AnswerRe: help me to select my project Pin
CPallini9-Sep-09 1:53
mveCPallini9-Sep-09 1:53 
AnswerRe: help me to select my project Pin
Richard MacCutchan9-Sep-09 3:02
mveRichard MacCutchan9-Sep-09 3:02 
General[Message Deleted] Pin
kabirbdboy9-Sep-09 15:25
kabirbdboy9-Sep-09 15:25 
GeneralRe: help me to select my project Pin
Tim Craig9-Sep-09 17:56
Tim Craig9-Sep-09 17:56 
GeneralRe: help me to select my project Pin
kabirbdboy10-Sep-09 1:38
kabirbdboy10-Sep-09 1:38 
GeneralRe: help me to select my project Pin
Richard MacCutchan9-Sep-09 21:37
mveRichard MacCutchan9-Sep-09 21:37 
AnswerRe: help me to select my project Pin
Nagy Vilmos10-Sep-09 9:41
professionalNagy Vilmos10-Sep-09 9:41 
GeneralRe: help me to select my project Pin
kabirbdboy10-Sep-09 15:08
kabirbdboy10-Sep-09 15:08 

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.