110,538
社区成员
发帖
与我相关
我的任务
分享
List<int> sorted = new List<int>(Enumerable.Range(1, 10000000));
bool hasBigNumberLinq = sorted.Any(x => x > 10000002); // 循环10000000次
bool hasBigNumber = sorted[sorted.Count - 1] > 10000002; // 1次
bool has88888Linq = sorted.Any(x => x == 88888); //循环88888次
bool has88888 = sorted.BinarySearch(88888) >= 0; //约17次