Photo by Etienne Boulanger on Unsplash

String Compression Problem - Solution in Python

Given an input string, write a function that returns the Run Length Encoded string for the input string.

For example, if the input string is ‘abbaa’, then the function should return ‘ab2a2’.

--

--

Photo by Scott Graham on Unsplash

Write a function to check if there are one edit(or zero edits) away

Given two strings str1 and str2, return the minimum number of operations required to convert str1 to str2. You have the following three operations permitted on a word:

— Insert a character

— Delete a character

— Replace a character

Solution:

--

--