Skip to content

Bug at binary search  #600

@mohanadtalat91

Description

@mohanadtalat91

Overflow will be happen at this line because if end=2147483647 & start=214 then the sum of start+end will be overflow.
So try to use the following formula to prevent overflow - - > mid=start+((end-start)/2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions