Groups
Groups
Sign in
Groups
Groups
tw.bbs.comp.oop
Conversations
About
Send feedback
Help
Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Learn more
請問二元搜尋
0 views
Skip to first unread message
愛愉
unread,
May 26, 2002, 11:33:58 AM
5/26/02
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
※ 引述《
clarin...@bbs.stut.edu.tw
(藍色楓瓶)》之銘言:
> 我是c++的新手
> 因為老師功課說要用到二元搜尋
> 請問二元搜尋是什麼啊
> 原理是什麼呢~
> 先謝謝各位高手~~
二元搜尋Binary search
其實日常很常用到
就像要一個人要你猜1到1000中一個數
對方只會說給你知, 你猜的大過或小過他心目中的
你不會由1猜到1000吧
最好是每次分一半,猜中間那個(500),
再根據別人的回覆,選擇那一段, (如500是小於,501-1000)
再重覆做一次, 即750...
如是者直至找到答案
--
[m○ Origin: 新竹師院 風之坊﹝
bbs.NHCTC.edu.tw
﹞From:
pc085.COMP.POLYU.EDU.HK
0 new messages