Skip to content

feat: add Number of Different Integers in a String (#2595)#2685

Open
Smithech wants to merge 1 commit intohackdartstorm:mainfrom
Smithech:issue-2595-smithech
Open

feat: add Number of Different Integers in a String (#2595)#2685
Smithech wants to merge 1 commit intohackdartstorm:mainfrom
Smithech:issue-2595-smithech

Conversation

@Smithech
Copy link
Copy Markdown

Solve “Number of Different Integers in a String” #2595

Add the function diff_integers_in_string(phrase: str) -> int

  • This function iterates through a string, checks whether each character is a digit, and keeps track of unique integers found in the string. It returns the total number of different integers.
  • Documentation for the function has been added.

Example:

diff_integers_in_string("2595") # returns 3

@Smithech Smithech changed the title Solve “Number of Different Integers in a String” (#2595) feat: add Number of Different Integers in a String (#2595) Mar 31, 2026
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.

1 participant