Re: Check for Common character sequence ( I will pay)?
- From: C <C@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 8 May 2006 11:41:02 -0700
Yeah. Its a Project I have to do in C#. And I really don't have a clue.
If you can do it I will pay you throuh Paypal.
Need it done tonight though.
Interested?
"Greg Young" wrote:
Homework?.
"C" <C@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:43D5A724-542B-49C0-8B22-72CEE887F86F@xxxxxxxxxxxxxxxx
Hi,
Anyone know how I can do this?
I will pay anyone via PayPal who can do this for me. Let me know?
Write a function in C# that takes in an array of ASCII strings and finds
all
common character sequences. A common character sequence is defined as 3
or
more adjacent characters that appear in more than one string in the array.
Use the following function signature for your response:
//C#
class FoundString {
public int cOccurrences; //count of times this substring
//occurred in the value array
public string szSubstring; //substring that was found
}
FoundString[] countSubstrings(string[] rgszValues);
Ex. input of ("will-01", "a_williams", "will_01_iam") would return
"wil" (cOccurrences = 3)
"will" (cOccurrences = 3)
"ill" (cOccurrences = 3)
"iam" (cOccurrences = 2)
Provide coded unit tests cases that exercise your solution.
For extra credit:
1a. Order the results in descending order based on the number of input
values each sequence matched.
1b. Prune the results by removing all results that are a substring of
another result that matched the same number of input values. In the above
example "wil" and "ill" would both be discarded because they are both a
substring of "will" and all 3 values match 3 input strings
- Follow-Ups:
- Re: Check for Common character sequence ( I will pay)?
- From: Kevin Spencer
- Re: Check for Common character sequence ( I will pay)?
- From: Greg Young
- Re: Check for Common character sequence ( I will pay)?
- References:
- Re: Check for Common character sequence ( I will pay)?
- From: Greg Young
- Re: Check for Common character sequence ( I will pay)?
- Prev by Date: Re: Check for Common character sequence ( I will pay)?
- Next by Date: Re: Check for Common character sequence ( I will pay)?
- Previous by thread: Re: Check for Common character sequence ( I will pay)?
- Next by thread: Re: Check for Common character sequence ( I will pay)?
- Index(es):
Relevant Pages
|