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

Added iterator approach & give constant arr size to avoid memory error #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

theraghavjuneja
Copy link

No description provided.

@Kanav-Arora
Copy link
Owner

Hi @theraghavjuneja
First of all thank you for contributing.
The change you have suggested isn't much required as its not making any change to the time or space complexity. Its not really and optimisation. Use of min_element iterator won't reduce the time.

Moreover the reason I haven't added a limit to arr length is because it depends on the question so I don't want to give a wrong idea.

But thumbs up for the eye for detail. Any other relevant contribution would be appreciated. I recommend if you can change the existing solutions to other languages like Java, Python or something.

Ping me if you need any help!

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.

2 participants