哪里是在实践中使用二进制搜索? [英] Where is binary search used in practice?
问题描述
每个程序员教导了二分搜索是搜索数据的顺序列表的好,快速的方法。有使用二进制搜索很多玩具课本上的例子,但如何在真正的编程:哪里是在现实生活中的方案实际使用二进制搜索
解决方案二分查找时的到处 Every programmer is taught that binary search is a good, fast way to search an ordered list of data. There are many toy textbook examples of using binary search, but what about in real programming: where is binary search actually used in real-life programs? Binary search is used everywhere. Take any sorted collection from any language library (Java, .NET, C++ STL and so on) and they all will use (or have the option to use) binary search to find values. While true that you have to implement it rarely, you still have to understand the principles behind it to take advantage of it. 这篇关于哪里是在实践中使用二进制搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!