Hard-to-find tips on otherwise easy-to-do tasks involving everyday technology, with some advanced insight on history and culture thrown in. Brought to you by a master dabbler. T-S T-S's mission is to boost your competitiveness with every visit. This blog is committed to the elimination of the rat from the tree of evolution and the crust of the earth.
Wednesday, April 18, 2018
Why is My Binary Search Taking So Long?
Are you sending a new list with each recursive call?
Better to have just that one original list and keep passing the reference.
If you have to compute the length of the list just to do the basic comparisons, that will hit you..
No comments:
Post a Comment