challenges

Some problem solving programming challenges, i have solved. Not all are here, but started adding them slowly.

This project is maintained by chankruze

Longest Common Substring

Task

Given multiple words, you need to find the longest string that is a substring of all words.

Input Format

A string of words, separated by spaces. The string can also contain numbers.

Output Format

A string, representing the longest common substring. If there are multiple longest common substrings, output the smallest one in alphabetical order.

Sample Input

SoloLearn Learning LearningIsFun Learnable

Sample Output

Learn

Explanation

Learn is the longest common substring for the words SoloLearn Learning LearningIsFun Learnable.

Explanation

Learn is the longest common substring for the words SoloLearn Learning LearningIsFun Learnable.

Solutions

Language Solution
C not available
CPP not available
C# not available
Python Not passeing all test cases
Java not available
Ruby not available
Swift not available