Kyle Sweeney

Results 3 comments of Kyle Sweeney

So this begs the question, when do we know it's sorted? We could sort it every time the method is called. But probably, we'd want to have a variable in...

Bsearch won't work in that instance, because bsearch only returns if a given item is in the array, not the first index as "index_of" normally returns. We could then just...

I mean the bsearch algorithm, not just the libc implementation, isn't guaranteed to return the first element in a sorted array which matches, just returns true if it does find...