Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Interview question - any suggestions

Reply
Thread Tools

Interview question - any suggestions

 
 
denis_browne@hotmail.com
Guest
Posts: n/a
 
      03-03-2006
Hi there,
I got a tough interview questions lately, and I would like to hear
your opinion:

An array of N chars is given
Write an efficient algorithm to find all the repeating substring with a

minimal size
of 2

f.e

ABCFABHYIFAB


sunstrings are:


"AB"
"FAB"


Any suggestions?

 
Reply With Quote
 
 
 
 
Vladimir S. Oka
Guest
Posts: n/a
 
      03-03-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hi there,
> I got a tough interview questions lately, and I would like to hear
> your opinion:
>
> An array of N chars is given
> Write an efficient algorithm to find all the repeating substring with a
>
> minimal size
> of 2
>
> f.e
>
> ABCFABHYIFAB
>
> sunstrings are:
>
> "AB"
> "FAB"
>
> Any suggestions?


Giving it a go? And then asking here about specific problems?

BTW, the way you state it, this is a question for comp.programming as I
don't see any reference to C.

 
Reply With Quote
 
 
 
 
Robin Haigh
Guest
Posts: n/a
 
      03-03-2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi there,
> I got a tough interview questions lately, and I would like to hear
> your opinion:
>
> An array of N chars is given
> Write an efficient algorithm to find all the repeating substring with a
>
> minimal size
> of 2
>
> f.e
>
> ABCFABHYIFAB
>
>
> sunstrings are:
>
>
> "AB"
> "FAB"
>
>
> Any suggestions?
>


FA is repeated as well. AB is different, because there's an additional AB
besides the ones that are part of FAB. These things tend to depend a lot on
the precise problem definition: clarification needed...

--
RSH



 
Reply With Quote
 
Robin Haigh
Guest
Posts: n/a
 
      03-03-2006

"Robin Haigh" <(E-Mail Removed)> wrote in message
news:du9b7h$auf$(E-Mail Removed)...
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
> > Hi there,
> > I got a tough interview questions lately, and I would like to hear
> > your opinion:
> >
> > An array of N chars is given
> > Write an efficient algorithm to find all the repeating substring with a
> >
> > minimal size
> > of 2
> >
> > f.e
> >
> > ABCFABHYIFAB
> >
> >
> > sunstrings are:
> >
> >
> > "AB"
> > "FAB"
> >
> >
> > Any suggestions?
> >

>
> FA is repeated as well. AB is different, because there's an additional AB
> besides the ones that are part of FAB. These things tend to depend a lot

on
> the precise problem definition: clarification needed...



I should also have asked about self-overlapping repeats -- does AAA contain
two instances of AA?

--
RSH


>



 
Reply With Quote
 
selvinmani@gmail.com
Guest
Posts: n/a
 
      03-03-2006

Hai friend,
You can always refer to any algorithm books like Computer Algorithms by
Sara Base for any doubts regarding algorithms. I think the answer for
your question is definetly found under the topic String
Matching/Seraching.

 
Reply With Quote
 
Vladimir S. Oka
Guest
Posts: n/a
 
      03-03-2006

(E-Mail Removed) wrote:
> Hai friend,
> You can always refer to any algorithm books like Computer Algorithms by
> Sara Base for any doubts regarding algorithms. I think the answer for
> your question is definetly found under the topic String
> Matching/Seraching.


Please quote what and who you're replying to. Lurk a while in here
before posting.

 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      03-03-2006
(E-Mail Removed) writes:
> You can always refer to any algorithm books like Computer Algorithms by
> Sara Base for any doubts regarding algorithms. I think the answer for
> your question is definetly found under the topic String
> Matching/Seraching.


Please read <http://cfaj.freeshell.org/google/>.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP Interview Questions ASP Interview Questions reema ASP General 0 08-26-2008 11:57 AM
.NET Interview Question, C#, ASP.NET Interview Questions dotnetuncle Javascript 0 10-30-2007 03:08 PM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
A technical question from a non-technical person. Any suggestions appreciated. Graham Cross VOIP 2 01-27-2005 09:13 PM
Help esk Suggestions - Best Practices, Tool, ideas, suggestions, etc JohnNews Computer Support 3 06-23-2003 11:20 PM



Advertisments