Problem 95. Given two strings, find the maximum overlap

Created by Cody Team in Community

Given two strings s1 and s2, create a new string s3 which is as short as possible and contains both strings.


 s1 = [1 2 3 4 5]


 s2 = [5 4 3 2]


 s3 = [1 2 3 4 5 4 3 2]

There is guaranteed to be one best solution.

Solution Stats

33.69% Correct | 66.31% Incorrect
Last solution submitted on Mar 13, 2019

Problem Comments

Solution Comments

Recent Solvers273

Suggested Problems

More from this Author95


Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!