1、Binary search is an efficient algorithm for finding an element's position in a sorted array.
二分查找是一种在已排序数组中寻找元素位置的高效算法。
2、The bisearch function returns the index of the first element in the sorted list that is greater than or equal to the target. bisearch 函数返回排序列表中第一个大于或等于目标值的元素的索引。
SHOW FULL COLUMNS FROM `tool_word` [ RunTime:0.001299s ]
SELECT `id`,`word`,`british`,`american`,`jbjs`,`wlsy`,`cx`,`lz` FROM `tool_word` WHERE `switch` = 1 AND `id` = 10137 LIMIT 1 [ RunTime:0.000405s ]
UPDATE `tool_word` SET `views` = `views` + 1 WHERE `id` = 10137 [ RunTime:0.003624s ]
SELECT `id`,`word` FROM `tool_word` WHERE `id` IN (101343,31105,77447,82614,53044,15733,440,13400,33219,42186,37908,55115,1778,91823,94755,25210,1191,10971,41970,75418,6846,97365,72117,98294,69483,65069,18463,91387,61589,61686) AND `switch` = 1 ORDER BY `id` DESC [ RunTime:0.006645s ]
SELECT `id`,`word` FROM `tool_word` WHERE `id` < 10137 AND `switch` = 1 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000607s ]
SELECT `id`,`word` FROM `tool_word` WHERE `id` > 10137 AND `switch` = 1 ORDER BY `id` LIMIT 1 [ RunTime:0.000552s ]