Biggest common sub-string search asymptotics

52 Views Asked by At

What is the function of Big-O in case where we use brute-force on two strings to find the biggest common sub-string. Please can you explain the underlying logic to the resulting formula corresponding to that Big-O.

How it is changing when we are looking for a common biggest sub-string in three different strings at same time. Also with brute-force.