阅读背景:

列表排序时在List中查找值的最佳方法

来源:互联网 

Let's say I have a Java ArrayList, that is sorted. Now I would like to find the index of value x. What would be the fastest (without more than 30 lines of code) way to do this? Use of the IndexOf() method? Iterate through all values in a simple for loop? Use of some cool algorithm? We are talking about around let's say 50 integer keys.Let's say I have a Java ArrayList, that is sort




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: