Skip to content

feat: added levenshtein#179

Merged
siriak merged 1 commit into
TheAlgorithms:masterfrom
Arpita23r:feat/lev-arpi23r
Oct 11, 2025
Merged

feat: added levenshtein#179
siriak merged 1 commit into
TheAlgorithms:masterfrom
Arpita23r:feat/lev-arpi23r

Conversation

@Arpita23r
Copy link
Copy Markdown
Contributor

  • Implemented Levenshtein (Edit) Distance algorithm in R to compute the minimum number of edits required to convert one string into another.
  • Uses dynamic programming for efficient computation in O(n × m) time.
  • Handles insertions, deletions, and substitutions as edit operations.
  • Supports case-insensitive input for flexible string comparisons.
  • Provides interactive user input for testing and demonstration.
  • Outputs the edit distance clearly, allowing easy verification of results.
  • Stored file under string_manipulation/edit.distance.R following project structure conventions.

@siriak siriak requested a review from Copilot October 11, 2025 08:47
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the Levenshtein distance algorithm in R to calculate the minimum number of edit operations (insertions, deletions, substitutions) required to transform one string into another. The implementation uses dynamic programming for efficient O(n×m) computation and includes interactive user input functionality.

  • Adds a complete Levenshtein distance function using dynamic programming
  • Includes interactive input handling with case-insensitive string comparison
  • Provides clear output formatting for the calculated edit distance

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread levenshtein.R
Comment thread levenshtein.R
Comment thread levenshtein.R
Copy link
Copy Markdown
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@siriak siriak merged commit f9ad732 into TheAlgorithms:master Oct 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants