Skip to content

Conversation

@AliAlimohammadi
Copy link
Contributor

Description

Adds the Abbreviation problem solution to the dynamic programming module.

Problem Statement

Determines if string a can be transformed into string b by capitalizing
zero or more lowercase letters and deleting all remaining lowercase letters.

Implementation Details

  • Uses dynamic programming approach
  • Time Complexity: O(n * m)
  • Space Complexity: O(n * m)
  • Includes comprehensive test cases from HackerRank

Checklist

  • Code follows the repository's style guidelines
  • Tests pass locally (cargo test)
  • Code formatted with cargo fmt
  • No warnings from cargo clippy
  • Updated mod.rs to include new module

Copy link
Contributor Author

@AliAlimohammadi AliAlimohammadi left a comment

Choose a reason for hiding this comment

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

Fixed typo

Copy link
Contributor Author

@AliAlimohammadi AliAlimohammadi left a comment

Choose a reason for hiding this comment

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

Fixed white spaces.

Copy link
Contributor Author

@AliAlimohammadi AliAlimohammadi left a comment

Choose a reason for hiding this comment

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

Fixed Clippy

Copy link
Contributor Author

@AliAlimohammadi AliAlimohammadi left a comment

Choose a reason for hiding this comment

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

Fixed test case

@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.45%. Comparing base (1ce9f3a) to head (cffa034).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #957   +/-   ##
=======================================
  Coverage   95.44%   95.45%           
=======================================
  Files         333      334    +1     
  Lines       21524    21550   +26     
=======================================
+ Hits        20544    20570   +26     
  Misses        980      980           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AliAlimohammadi
Copy link
Contributor Author

Hi @siriak, Could you please check this PR? Thanks.

@siriak
Copy link
Member

siriak commented Nov 30, 2025

Hi, there are already enough examples of dynamic programming in this repository and we don't add problems from LeetCode and similar sites (only a few if needed to demonstrate a programming technique)

@siriak siriak closed this Nov 30, 2025
@AliAlimohammadi AliAlimohammadi deleted the add-abbreviation-algorithm branch November 30, 2025 08:40
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