Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Length of Longest sub array without repeating characters (Window Sliding) #8699

Open
wants to merge 8 commits into
base: Competitive_Programming
Choose a base branch
from

Conversation

yellowberard
Copy link
Contributor


Description 📜

To find the Length of Longest sub array without repeating characters by Window Sliding method.
Fixes #1283


Type of change 📝

  • Doc#umentation (Content Creation in the form of codes or tutorials)

Domain of Contribution 📊

  • Competitive #Programming

Checklist ✅

  • I follow Contributing Guidelines & Code of conduct of this project.
  • I have performed a self-review of my own code or work.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generates no new warnings.
  • I'm GWOC'21 contributor


@yellowberard
Copy link
Contributor Author

@ravireddy07 Please review my PR.

Comment on lines +5 to +9
## Explanation
In this program we are using the concept of Window sliding i.e. Whenever we see repetition, we remove the previous occurrence and slide the window.
A loop is runniig from i=0 to n=sizeof(str).
In side this loop one more loop is running from j=i till n.
We define vector with all the value as false and keep it makin true for the characters that are visited once in the loop.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please explain the approach in detail with snippet examples as this is a basic problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants