Interview Question for Software Engineer / Developers


Country: United States




Comment hidden because of low score. Click to expand.
0
of 0 vote

Is it given that which of the two strings can be the first string? Or is it that programmer has to write program so that it takes care of both cases: one string being the first or the other string being the first?

- Learner June 12, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

we know which is first and second string.

- ninja June 12, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

stackoverflow.com/questions/5499024/detect-largest-suffix-of-some-file-that-is-prefix-of-another-file

- Anonymous June 12, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Are you sure it wasn't Farhan and Nitrate.

- 4th idiot. June 12, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Use KMP algorithm

- Anonymous June 12, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Any matching problem and you bring out KMP? How does that deal with linked lists? Also, this is a special case of pattern matching...

- Anonymous June 14, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

use suffix tree... create suffix tree of both strings... and at end of each branch out the string name... if any branch has both strings name, then you last complete word before the leaf node is the longest suffix.... then you can append string2 to string 1, where string 2 is starting from 0 + len of longest suffix

- maddy June 12, 2012 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More