博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年4月10日

摘要: javascipt---实现二分查找法:<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8"><script type="text/javascript"> //window.alert(Math.floor(5.7)); //向下取整 输出5 //二分查找法 数组必须是有序的 function binarySeach(arr,findval,leftIndex,rightIndex){ 阅读全文

posted @ 2013-04-10 11:51 Step at a time 阅读(313) 评论(0) 推荐(0) 编辑