Wednesday, March 28, 2018

[JavaScript][Example] Binary search demo

It's a hell during writing binary search, I always make some super long loop when compare the numbers, here is the finished version:

To know more about binary search, check for these 2 links:
https://www.geeksforgeeks.org/binary-search/
https://en.wikipedia.org/wiki/Binary_search_algorithm

No comments :

Post a Comment