lorenzoracca / Swift-binary-search

Binary search imply that will presented as proposal to swift-evolution
2 stars 2 forks source link

Clarify motivation, explain methods & add examples #4

Closed natecook1000 closed 8 years ago

natecook1000 commented 8 years ago

Thanks for including me on this! The motivation section had some inaccurate statements—contains is linear, not exponential, and sorting an array just to search it is slower than simply performing a linear search O(n log n) vs O(n). I've also provided explanations and some simple examples of the methods, since their meaning might not be commonly understood.

lorenzoracca commented 8 years ago

Thank you Nate!