Skip to content

Conversation

@meetpatel98
Copy link

Pull Request Template

Description

### Given a string s, find the length of the longest substring without repeating characters.

Example 1:
Input: s = "abcabcbb"
Output: 3
Explanation: The answer is "abc", with the length of 3.

Example 2:
Input: s = "bbbbb"
Output: 1
Explanation: The answer is "b", with the length of 1.

Complexity Analysis of My Solution
Time complexity: O(n). Index j will iterate n times.
Space complexity : O(min(m,n))

Put check marks:

Have you made changes in README file ?

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

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • [Yes] Test A
    Example 1:
    Input: s = "abcabcbb"
    Output: 3
    Explanation: The answer is "abc", with the length of 3.

  • [Yes] Test B
    Example 3:
    Input: s = "pwwkew"
    Output: 3
    Explanation: The answer is "wke", with the length of 3.
    Notice that the answer must be a substring, "pwke" is a subsequence and not a substring.

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

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

welcome bot commented Oct 28, 2022

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

meetpatel98 and others added 3 commits October 28, 2022 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant