compare strings - MATLAB Cody - MATLAB Central

Problem 1032. compare strings

Difficulty:Rate

Given 2 strings and 3 actions (Insert,delete,replace) on characters. Find the difference between two strings.

Example:

string1 = 'spring'

string2 = 'strange'

replace(p,t), replace(i,a), insert(e) = 3 actions = 3 differences

so the answer is 3

Solution Stats

54.1% Correct | 45.9% Incorrect
Last Solution submitted on Jun 01, 2025

Problem Comments

Solution Comments

Show comments
MATLAB EXPO 2025 Registration is Now Open! November 12 – 13, 2025
Registration is now open for MathWorks annual virtual event MATLAB EXPO 2025...
0

Problem Recent Solvers30

Suggested Problems

More from this Author11

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!