finding the longest string with maximum repetitions from a file
up vote
-3
down vote
favorite
This is my question. And I am stuck. It'd be great if I could get some help.
Write a program to find the biggest string that appears maximum times in the DNA.txt (uploaded on moodle).
For example:
Consider the following sequence DNA_X :
DNA_X: acccgttacagctgacccgttacgtcaacccgttaccgatacccgttacagt
In the above sequence, the string “acccgttac” is the string with the highest length (9) that appears maximum number of times. The highlighted string below has the maximum length with the highest number of occurrence.
acccgttacagctgacccgttacgtcaacccgttaccgatacccgttacagt
c++ data-structures linked-list tree
|
show 1 more comment
up vote
-3
down vote
favorite
This is my question. And I am stuck. It'd be great if I could get some help.
Write a program to find the biggest string that appears maximum times in the DNA.txt (uploaded on moodle).
For example:
Consider the following sequence DNA_X :
DNA_X: acccgttacagctgacccgttacgtcaacccgttaccgatacccgttacagt
In the above sequence, the string “acccgttac” is the string with the highest length (9) that appears maximum number of times. The highlighted string below has the maximum length with the highest number of occurrence.
acccgttacagctgacccgttacgtcaacccgttaccgatacccgttacagt
c++ data-structures linked-list tree
1
The problem is actually about finding the longest substring that repeats the most, the current topic is confusing.
– JiaHao Xu
Nov 11 at 2:25
Please clarify where you are stuck - that is: What have you tried already and where does your current solution fail? See stackoverflow.com/help/on-topic #3.
– hlg
Nov 11 at 2:31
1
"It'd be great if I could get some help." -- unfortunately, stackoverflow.com is not a tutorial web site. This is a Q&A site, with concrete, specific questions on programming-related topics.
– Sam Varshavchik
Nov 11 at 2:32
@Bishnu bro There is an inconsistency in this question: If you want the highest repetition times, a single-character string probably repeats most.
– JiaHao Xu
Nov 11 at 2:33
1
Why isn'tc
the answer ?
– Hiroki
Nov 11 at 5:10
|
show 1 more comment
up vote
-3
down vote
favorite
up vote
-3
down vote
favorite
This is my question. And I am stuck. It'd be great if I could get some help.
Write a program to find the biggest string that appears maximum times in the DNA.txt (uploaded on moodle).
For example:
Consider the following sequence DNA_X :
DNA_X: acccgttacagctgacccgttacgtcaacccgttaccgatacccgttacagt
In the above sequence, the string “acccgttac” is the string with the highest length (9) that appears maximum number of times. The highlighted string below has the maximum length with the highest number of occurrence.
acccgttacagctgacccgttacgtcaacccgttaccgatacccgttacagt
c++ data-structures linked-list tree
This is my question. And I am stuck. It'd be great if I could get some help.
Write a program to find the biggest string that appears maximum times in the DNA.txt (uploaded on moodle).
For example:
Consider the following sequence DNA_X :
DNA_X: acccgttacagctgacccgttacgtcaacccgttaccgatacccgttacagt
In the above sequence, the string “acccgttac” is the string with the highest length (9) that appears maximum number of times. The highlighted string below has the maximum length with the highest number of occurrence.
acccgttacagctgacccgttacgtcaacccgttaccgatacccgttacagt
c++ data-structures linked-list tree
c++ data-structures linked-list tree
edited Nov 11 at 2:22
user1118321
19.2k43963
19.2k43963
asked Nov 11 at 2:16
Bishnu bro
1
1
1
The problem is actually about finding the longest substring that repeats the most, the current topic is confusing.
– JiaHao Xu
Nov 11 at 2:25
Please clarify where you are stuck - that is: What have you tried already and where does your current solution fail? See stackoverflow.com/help/on-topic #3.
– hlg
Nov 11 at 2:31
1
"It'd be great if I could get some help." -- unfortunately, stackoverflow.com is not a tutorial web site. This is a Q&A site, with concrete, specific questions on programming-related topics.
– Sam Varshavchik
Nov 11 at 2:32
@Bishnu bro There is an inconsistency in this question: If you want the highest repetition times, a single-character string probably repeats most.
– JiaHao Xu
Nov 11 at 2:33
1
Why isn'tc
the answer ?
– Hiroki
Nov 11 at 5:10
|
show 1 more comment
1
The problem is actually about finding the longest substring that repeats the most, the current topic is confusing.
– JiaHao Xu
Nov 11 at 2:25
Please clarify where you are stuck - that is: What have you tried already and where does your current solution fail? See stackoverflow.com/help/on-topic #3.
– hlg
Nov 11 at 2:31
1
"It'd be great if I could get some help." -- unfortunately, stackoverflow.com is not a tutorial web site. This is a Q&A site, with concrete, specific questions on programming-related topics.
– Sam Varshavchik
Nov 11 at 2:32
@Bishnu bro There is an inconsistency in this question: If you want the highest repetition times, a single-character string probably repeats most.
– JiaHao Xu
Nov 11 at 2:33
1
Why isn'tc
the answer ?
– Hiroki
Nov 11 at 5:10
1
1
The problem is actually about finding the longest substring that repeats the most, the current topic is confusing.
– JiaHao Xu
Nov 11 at 2:25
The problem is actually about finding the longest substring that repeats the most, the current topic is confusing.
– JiaHao Xu
Nov 11 at 2:25
Please clarify where you are stuck - that is: What have you tried already and where does your current solution fail? See stackoverflow.com/help/on-topic #3.
– hlg
Nov 11 at 2:31
Please clarify where you are stuck - that is: What have you tried already and where does your current solution fail? See stackoverflow.com/help/on-topic #3.
– hlg
Nov 11 at 2:31
1
1
"It'd be great if I could get some help." -- unfortunately, stackoverflow.com is not a tutorial web site. This is a Q&A site, with concrete, specific questions on programming-related topics.
– Sam Varshavchik
Nov 11 at 2:32
"It'd be great if I could get some help." -- unfortunately, stackoverflow.com is not a tutorial web site. This is a Q&A site, with concrete, specific questions on programming-related topics.
– Sam Varshavchik
Nov 11 at 2:32
@Bishnu bro There is an inconsistency in this question: If you want the highest repetition times, a single-character string probably repeats most.
– JiaHao Xu
Nov 11 at 2:33
@Bishnu bro There is an inconsistency in this question: If you want the highest repetition times, a single-character string probably repeats most.
– JiaHao Xu
Nov 11 at 2:33
1
1
Why isn't
c
the answer ?– Hiroki
Nov 11 at 5:10
Why isn't
c
the answer ?– Hiroki
Nov 11 at 5:10
|
show 1 more comment
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245277%2ffinding-the-longest-string-with-maximum-repetitions-from-a-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
The problem is actually about finding the longest substring that repeats the most, the current topic is confusing.
– JiaHao Xu
Nov 11 at 2:25
Please clarify where you are stuck - that is: What have you tried already and where does your current solution fail? See stackoverflow.com/help/on-topic #3.
– hlg
Nov 11 at 2:31
1
"It'd be great if I could get some help." -- unfortunately, stackoverflow.com is not a tutorial web site. This is a Q&A site, with concrete, specific questions on programming-related topics.
– Sam Varshavchik
Nov 11 at 2:32
@Bishnu bro There is an inconsistency in this question: If you want the highest repetition times, a single-character string probably repeats most.
– JiaHao Xu
Nov 11 at 2:33
1
Why isn't
c
the answer ?– Hiroki
Nov 11 at 5:10