Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a program to calculate the Levenshtein distance between two strings.

Hard

Problem Statement

Write a program to calculate the Levenshtein distance between two strings.

Sample Input

Strings: "kitten" and "sitting"

Sample Output

Levenshtein Distance: 3

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
using System; class LevenshteinDistance { static void Main() { // Calculate the Levenshtein distance between two strings } }
Log in or sign up to run or submit your code.Log inSign up
Input
Strings: "kitten" and "sitting"
Expected Output
Levenshtein Distance: 3