LeetCode-Solutions icon indicating copy to clipboard operation
LeetCode-Solutions copied to clipboard

Added Solution to 2405. Optimal Partition of String in C++

Open Lakshaykumarr28 opened this issue 2 years ago • 2 comments

Description of the Problem

We were Given a string s, we had to partition the string into one or more substrings such that the characters in each substring are unique. That is, no letter appears in a single substring more than once.

The solution should Return the minimum number of substrings in such a partition.

Put check marks:

Have you made changes in README file ?

yes, I have added my required details in the Readme file.

  • [x] Added problem & solution under correct topic.
  • [x] Specified Space & Time complexity.
  • [x] Specified difficulty level, tag & Note(if any).

How Has This Been Tested?

I passed all testcases for the problem and my solution works on all strings. I tried my best to keep the time and space complexity minimum.

  • [x] Test A
  • [x] Test B

Make sure all below guidelines are followed else PR will get Reject:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code so that it is easy to understand
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] Any dependent changes have been merged and published in downstream modules

Lakshaykumarr28 avatar Oct 01 '23 20:10 Lakshaykumarr28

I can tell this is your first pull request! Thank you I'm so honored. :tada::tada::tada: I'll take a look at it ASAP!

welcome[bot] avatar Oct 01 '23 20:10 welcome[bot]

Hey there, I have added my solution for this problem and specified its difficulty, time and space complexity and memory utilisation in the comments and also updated the README file. Please consider my Pull Request. Thanks.

Lakshaykumarr28 avatar Oct 01 '23 20:10 Lakshaykumarr28