Click here to Skip to main content
15,910,787 members
Home / Discussions / C#
   

C#

 
GeneralRe: Error when trying to make a web service client Pin
SeMartens8-Sep-09 4:26
SeMartens8-Sep-09 4:26 
GeneralRe: Error when trying to make a web service client Pin
SorenBerggreen8-Sep-09 21:17
SorenBerggreen8-Sep-09 21:17 
AnswerRe: Error when trying to make a web service client Pin
SorenBerggreen8-Sep-09 21:16
SorenBerggreen8-Sep-09 21:16 
Questionhex Pin
sanforjackass8-Sep-09 2:22
sanforjackass8-Sep-09 2:22 
AnswerRe: hex Pin
Luc Pattyn8-Sep-09 2:24
sitebuilderLuc Pattyn8-Sep-09 2:24 
GeneralRe: hex Pin
DaveyM698-Sep-09 3:38
professionalDaveyM698-Sep-09 3:38 
GeneralRe: hex Pin
Luc Pattyn8-Sep-09 3:42
sitebuilderLuc Pattyn8-Sep-09 3:42 
GeneralRe: hex Pin
DaveyM698-Sep-09 4:02
professionalDaveyM698-Sep-09 4:02 
GeneralRe: hex Pin
sanforjackass8-Sep-09 4:02
sanforjackass8-Sep-09 4:02 
GeneralRe: hex Pin
Luc Pattyn8-Sep-09 4:09
sitebuilderLuc Pattyn8-Sep-09 4:09 
QuestionUpdate Cache Data Pin
sjs4u8-Sep-09 2:17
sjs4u8-Sep-09 2:17 
AnswerRe: Update Cache Data Pin
Manas Bhardwaj8-Sep-09 2:18
professionalManas Bhardwaj8-Sep-09 2:18 
GeneralRe: Update Cache Data Pin
sjs4u8-Sep-09 2:38
sjs4u8-Sep-09 2:38 
QuestionGet the automated changes from excel Pin
NarVish8-Sep-09 2:09
NarVish8-Sep-09 2:09 
QuestionSearch for repeated character combinations Pin
khalidelmeknesi8-Sep-09 2:07
khalidelmeknesi8-Sep-09 2:07 
AnswerRe: Search for repeated character combinations Pin
sanforjackass8-Sep-09 2:58
sanforjackass8-Sep-09 2:58 
GeneralRe: Search for repeated character combinations Pin
khalidelmeknesi8-Sep-09 3:08
khalidelmeknesi8-Sep-09 3:08 
AnswerRe: Search for repeated character combinations [modified] Pin
sanforjackass8-Sep-09 4:00
sanforjackass8-Sep-09 4:00 
GeneralRe: Search for repeated character combinations [modified] Pin
khalidelmeknesi16-Sep-09 22:48
khalidelmeknesi16-Sep-09 22:48 
AnswerRe: Search for repeated character combinations Pin
sanforjackass18-Sep-09 12:05
sanforjackass18-Sep-09 12:05 
AnswerRe: Search for repeated character combinations Pin
Ian Shlasko8-Sep-09 5:41
Ian Shlasko8-Sep-09 5:41 
Well, I'm sure there's a better algorithm for this, but here's one off the top of my head:

Note that this is NOT an efficient algorithm, and will NOT earn you any prizes if this is a school assignment (And if that's the case, keep in mind your teacher may be reading this).

NONE
1. Keep a string:int dictionary of substring:count

2. Loop through each character:
  a. Looping from 2 to your maximum substring size (Say, 5)
    i.  Grab the substring of that length from the current position
    ii. Add/increment it in the dictionary

3. Look through the dictionary keys:
  a. See if the key is a substring of any other keys, with an equal count... If so, just delete this key.


Grab 'em, sort 'em, and display 'em...

If you want a better algorithm, you could try posting this in the Algorithms forum... I would guess there are at least a dozen formalized and documented algorithms to handle this, with all sorts of fancy names, that the folks there could point you to.

Proud to have finally moved to the A-Ark. Which one are you in?
Developer, Author (Guardians of Xen)

GeneralRe: Search for repeated character combinations Pin
khalidelmeknesi8-Sep-09 21:48
khalidelmeknesi8-Sep-09 21:48 
QuestionRedirect Console for In-Memory Execution Pin
Anindya Chatterjee8-Sep-09 1:49
Anindya Chatterjee8-Sep-09 1:49 
AnswerRe: Redirect Console for In-Memory Execution Pin
Not Active8-Sep-09 2:19
mentorNot Active8-Sep-09 2:19 
GeneralRe: Redirect Console for In-Memory Execution Pin
Anindya Chatterjee8-Sep-09 3:27
Anindya Chatterjee8-Sep-09 3:27 

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.