美团点评_给出两个字符串(可能包含空格),找出其中最长的公共连续子串,输出其长度。

给出两个字符串(可能包含空格),找出其中最长的公共连续子串,输出其长度。

import java.util.*;
public class Meituan_4 {
	public static void main(String[] arg){
		Scanner sc = new Scanner(System.in);
		String str_1 = sc.nextLine();
		String str_2 = sc.nextLine();
		int maxlength=0;
        //穷举str_1中的字符片段
		for(int i=0;i

 

你可能感兴趣的:(算法,剑指Offer题目)