Description
Certain sorted array inputs cause a division by 0 exception.
this was found while writing a test proof
Steps to reproduce
Run the find with the following examples:
- [0, 0, 0, 2], 2
- [2, 2, 2, 2], 2
- [0, 1, 2, 4], 4
you will get a division by 0 exception
Expected behavior
No division by 0 exception.
For the above examples the following outputs:
- [0, 0, 0, 2], 2 -> 3
- [2, 2, 2, 2], 2 -> 0
- [0, 1, 2, 4], 4 -> 3
Screenshots
No response
Additional context
Fix tested here with the same proof: bmc4j/bmc4j-proofs-the-algorithms-java#4
Happy to make PR - making this issue as instructed in the contributors guide
Description
Certain sorted array inputs cause a division by 0 exception.
this was found while writing a test proof
Steps to reproduce
Run the find with the following examples:
you will get a division by 0 exception
Expected behavior
No division by 0 exception.
For the above examples the following outputs:
Screenshots
No response
Additional context
Fix tested here with the same proof: bmc4j/bmc4j-proofs-the-algorithms-java#4
Happy to make PR - making this issue as instructed in the contributors guide