This game helps you understand the Binary Search algorithm.這個遊戲幫助您理解二分搜尋演算法。
How to Play:如何遊玩:
A target number will be highlighted in the array. Note: arrays in this game start from index 0!陣列中會突出顯示一個目標數字。 請注意,遊戲中的陣列從索引 0 開始!
Your goal is to find this target number by eliminating half of the search space in each step to narrow down the search until you find the target!您的目標是透過消除一半的搜尋空間以縮小搜尋範圍,直到找到目標數字!。
The game will show you the current 'left', 'right', and 'middle' elements.遊戲將顯示當前「左」、「右」和「中間」元素。
Choose to eliminate the left half, the right half, or confirm if the middle element is the target.選擇消除左半部分、右半部分,或確認中間元素是否為目標。
Gameplay Description:遊戲玩法說明:
Your goal is to find the target number by using the "Go Left" or "Go Right" buttons to reduce the search area.您的目標是透過使用「向左」或「向右」按鈕來縮小搜尋範圍,以找到目標數字。
If the current middle element is the target, click "Found".如果當前指向的中間元素是目標,請點擊「找到」。
The marks under the elements indicate the current left boundary (L), right boundary (R), and the middle element (M) of the array.元素下方的標記表示陣列的當前左邊界 (L)、右邊界 (R) 和中間元素 (M)。