Community

Start a Thread


Notifications
Subscribe You’re not receiving notifications from this thread.

Find Deletion Distance (Main Thread)

Here is the interview question prompt, presented for reference.

Can you determine the deletion distance between two strings? Let's define the deletion distance as the numbers of characters needed to delete from two strings to make them equal.

For example, the deletion distance of algo and daily is 5. The reason is we can delete the go (2 deletion) in algo, and the d, i and y (3 deletions) in daily.

Constraints

  • Length of both the strings <= 1000
  • The strings can be empty
  • Take into consideration all the ASCII characters
  • Let m and n be the the lengths of string 1 and string 2
  • Expected time complexity O(m*n)
  • Expected space complexity : O(m*n)

You can see the full challenge with visuals at this link.

Challenges • Asked almost 7 years ago by Jake from AlgoDaily

Jake from AlgoDaily Commented on Nov 30, 2017:

This is the main discussion thread generated for Find Deletion Distance.