Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Bug in OnlineMedian.java #18

Closed
Gannys001 opened this issue Oct 17, 2019 · 2 comments
Closed

Bug in OnlineMedian.java #18

Gannys001 opened this issue Oct 17, 2019 · 2 comments

Comments

@Gannys001
Copy link

At line 58, the new number should be pushed into lowerHalf when higherHalf is empty.

@chellitorvic
Copy link
Contributor

But then it can result in NullPointerException at line 61 on the insertion of the next element, i.e. sequence [1, 2].

I've created pull request to address the issue #22

@bephrem1
Copy link
Owner

@chellitorvic Thanks, merged your pr

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

No branches or pull requests

3 participants