Rephrasing the question again : Q. Find all the patterns which are present in the character array given. A pattern is a sub-array containing 2 or more chars and is having a frequency of more than one.
Example: i/p: aabcdadabc o/p: ab, abc, bc, da basically what we have to search is those sub-string(s) of length 2 or more which repeats itself(not necessarily twice, but 'n' number of times). In the above example 'ab' has been highlighted with red in order to make it clear. Another example: i/p : fghjerhjfgjefgh o/p: fg, je , hj, fgh I hope its clear now. Thanks Ankit Mahendru On Tue, Feb 2, 2010 at 8:31 PM, vivek bijlwan <viv...@gmail.com> wrote: > explain the question a little further please > > > On Tue, Feb 2, 2010 at 11:03 AM, Algoose Chase <harishp...@gmail.com>wrote: > >> Hope you meant a pattern is sub-array containing 2 or more UNIQUE chars. >> hope based on dfn, "abcd" is also a pattern in the input you have given. >> >> >> On Tue, Feb 2, 2010 at 1:11 AM, ankit mahendru <ankit.mahend...@gmail.com >> > wrote: >> >>> Q. Find all the patterns once which are present in the character array >>> given. A pattern is a sub-array containing 2 or more chars. >>> >>> Example: >>> >>> i/p: aabcdadabc >>> >>> o/p: ab, abc, bc, da >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to algoge...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algoge...@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.