Skip to content
Medium-Easy Apply Dynamic Programming Multiple Choice

What is the base case for Edit Distance when one string is empty?

Apply — Tests ability to use knowledge in practical scenarios.

Answer Options

A 0 for all
B dp[i][0]=i and dp[0][j]=j
C dp[i][0]=1 and dp[0][j]=1
D Undefined — both must be non-empty

Want to see the correct answer?

Get the answer with a detailed explanation, plus practice 32+ more Dynamic Programming questions with adaptive quizzes and timed interviews.

See the Answer on Guru Sishya →

This question is from the Dynamic Programming topic (Algorithms).

More Dynamic Programming Questions