Inspired from the programming problems blog, i decided to post a few which demonstrate some interesting concepts as well as being moderately tough. Some of these are inspired by Programming pearls, a gem and a must every developer should read, re-read and possess.Heres the first programming problem.
Given a sequence of characters, find the longest duplicated substring of characters in it.For example for the String ‘ Ask not what your country can do for, but what you can do for your country.’ ‘Can do for you’ is the longest duplicated sub-string. How would you write a program to solve this problem?
Please do not post the solution on the site. You can mail the solutions across to firstname.lastname@example.org or alternatively post the solutions on your own blogs.