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

Fixed Runtime Error that was causing the code to not run. #6

Merged
merged 1 commit into from
Oct 16, 2019
Merged

Fixed Runtime Error that was causing the code to not run. #6

merged 1 commit into from
Oct 16, 2019

Conversation

mohamedsugal
Copy link
Contributor

Fixed a small code issue that was causing a Runtime Error in the Leetcode editor. I think it was due to not checking if the length of the array is less than 2. When I added that condition the code passed the test and it was accepted.

…ode editor because we weren't checking if the length of array is less than 2
Copy link
Owner

@vprusso vprusso left a comment

Choose a reason for hiding this comment

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

Great. Looks like the edge case of less than two prices in a list will throw it off. Thanks for contributing!

@vprusso vprusso merged commit e1009c4 into vprusso:master Oct 16, 2019
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