473,396 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Interview question - any suggestions

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?

Mar 3 '06 #1
6 1799
de**********@hotmail.com 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.

Mar 3 '06 #2

<de**********@hotmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr 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

Mar 3 '06 #3

"Robin Haigh" <ec*****@leeds.ac.uk> wrote in message
news:du**********@news6.svr.pol.co.uk...

<de**********@hotmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr 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


Mar 3 '06 #4

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.

Mar 3 '06 #5

se********@gmail.com 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.

Mar 3 '06 #6
se********@gmail.com 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) ks***@mib.org <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.
Mar 3 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Method Man | last post by:
Hi all, I was wondering if any of you could post some links to sites with good C++ interview questions. An answer key is preferred but not necessary. The Q's can range from entry level to senior...
2
by: tumour | last post by:
Dear All, I have an upcoming interview with a company and the position involves dealing with C++ projects (financial software mostly). I will be working in a team responsible for updating,...
3
by: denis_browne | last post by:
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 ...
0
by: softwareengineer2006 | last post by:
All Interview Questions And Answers 10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP) I have listed over 10000 interview questions asked in interview/placement test papers for...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
0
by: connectrajesh | last post by:
INTERVIEWINFO.NET http://www.interviewinfo.net FREE WEB SITE AND SERVICE FOR JOB SEEKERS /FRESH GRADUATES NO ADVERTISEMENT
22
by: Nicholls.Mark | last post by:
I want to set some simple coding tests for an interview....Joel recommends (for C programmers).... 1. Reverse a string in place 2. Reverse a linked list 3. Count all the bits that are on in a...
0
by: reema | last post by:
EJB Interview Questions http://interviewdoor.com/technical/EJB-Interview-Questions.htm CSS Interview Questions http://interviewdoor.com/technical/CSS-Interview-Questions.htm C Interview Questions...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.