codezonediitj / pydatastructs

A python package for data structures and algorithms
https://pydatastructs.readthedocs.io/en/stable/
Other
202 stars 270 forks source link

upper_bound and lower_bound functions added #351

Closed sHiVaNgI821 closed 3 years ago

sHiVaNgI821 commented 3 years ago

References to other Issues or PRs or Relevant literature

Added the upper_bound and lower_bound functions to the algorithms library. Upper_bound returns the index of the first occurence of an element greater than value, in the given sorted OneDimensionalArray. Lower_bound returns the index of the first occurence of an element which is not less than value, in the given OneDimensionalArray.

Brief description of what is fixed or changed

Other comments

codecov[bot] commented 3 years ago

Codecov Report

Merging #351 (c676829) into master (e1134b1) will increase coverage by 0.013%. The diff coverage is 100.000%.

@@              Coverage Diff              @@
##            master      #351       +/-   ##
=============================================
+ Coverage   98.561%   98.574%   +0.013%     
=============================================
  Files           25        25               
  Lines         3267      3297       +30     
=============================================
+ Hits          3220      3250       +30     
  Misses          47        47               
Impacted Files Coverage Δ
pydatastructs/linear_data_structures/__init__.py 100.000% <ø> (ø)
pydatastructs/linear_data_structures/algorithms.py 99.653% <100.000%> (+0.040%) :arrow_up:

Impacted file tree graph

Smit-create commented 3 years ago

@sHiVaNgI821 Please address this https://github.com/codezonediitj/pydatastructs/pull/344#issuecomment-797416009 in your PR too

Smit-create commented 3 years ago

Looks good to me.

Smit-create commented 3 years ago

@czgdp1807 Have a look at it

Smit-create commented 3 years ago

@sHiVaNgI821 Please resolve merge conflicts

czgdp1807 commented 3 years ago

Looks Good. Will polish it and push back again.

Smit-create commented 3 years ago

@czgdp1807 This can be merged.

czgdp1807 commented 3 years ago

Thanks.