Number Guessing

Binary Search

In this kind of games, we use binary search, The binary search consist in find the position of a target value within a sorted array. Binary search compares the target value to the middle element of the array. If they are not equal, the half in which the target cannot lie is eliminated and the search continues on the remaining half, again taking the middle element to compare to the target value, and repeating this until the target value is found. If the search ends with the remaining half being empty, the target is not in the array.

binary search
Photo by macedit

Well in this game we use the simple case of binary search like a game, because we are trying to guess one number and we only use binary search, so we apply some data structure, with algorithms and we have this great game.

Anuncios

Publicado por Masharelli

-Estudiante del Tecnologico de Monterrey -Ingenieria en Sistemas Computacionales -Geek -Catador de Tacos

Deja un comentario

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión /  Cambiar )

Google photo

Estás comentando usando tu cuenta de Google. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )

Conectando a %s

Crea tu página web en WordPress.com
Empieza ahora
A %d blogueros les gusta esto: