Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3ff3d10

Browse files
Create LongestCommonSubstring.txt
1 parent a79eacf commit 3ff3d10

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Longest Common Substring | DP-29
2+
3+
Given two strings ‘X’ and ‘Y’, find the length of the longest common substring.
4+
5+
Examples :
6+
7+
Input : X = "abcdxyz", y = "xyzabcd"
8+
Output : 4
9+
The longest common substring is "abcd" and is of length 4.
10+
11+
Input : X = "zxabcdezy", y = "yzabcdezx"
12+
Output : 6
13+
The longest common substring is "abcdez" and is of length 6.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /