c# - Self Contained Binary Search with only a single int and array parameter -


so have function need create in addition binary search must data mining (so not pure binary search)/

custombinarysearch(int goal, int[] myarray)

i know quite how go making binary search. problem stems signature of function. pass index values of sub-array recursively call required maintain original signature.

is there way pass sub-segment of array without creating new array? trying efficient code.

aka custombinarysearch(goal, myarray[startindex, endindex])?

the problem stems signature of function. pass index values of sub-array recursively call required maintain original signature.

make public method call private method has signature prefer.

is there way pass sub-segment of array without creating new array?

this feature proposed c# 7.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -