Examples
Búsqueda binaria del 23, paso a paso
Binary search in Spanish with JavaScript: lo, mid and hi close in on 23 in 4 checks, setting half of what is left aside each time.
This video was made with the Algorithm visuals skill.
- 0:57
- Algorithm visuals
- Narrated by Puck
- Spanish
Made from a prompt
Búsqueda binaria: encuentra el 23 en una lista ordenada, en JavaScript Video transcript
¿Cómo encontramos el 23 sin revisar toda la lista ordenada?
La lista está ordenada: si 23 está, sigue entre lo y hi. Naranja indica la línea actual; verde indica terminado.
La línea 2 fija límites; la 4 calcula mid: 4, con valor 17.
17 es menor que 23, así que lo avanza a 5.
27 es mayor: hi retrocede a 6. ¿Qué mitad creen que conservaremos ahora?
21 es menor que 23: conservamos la derecha y lo pasa a 6.
23 coincide: devolvemos 6, dentro del intervalo conservado. Necesitamos datos ordenados.
El punto marca 4 comprobaciones para 10 elementos; el trabajo crece logarítmicamente, despacio incluso con listas grandes.
Encontramos el 23 en el índice 6 descartando mitades.
More examples
-
Where the money goes when you buy a $5 coffee A $5 latte split into what it pays for, one hand-drawn picture at a time: ingredients, staff, rent and running costs, the 50¢ left over, and why a quiet day makes every cup carry more rent. 2:14 · English -
Why your stomach gets gassy Where gas comes from, drawn and painted in as it is said: swallowed air, gut bacteria and foods like beans and milk, what normal looks like, what helps, and when to see a doctor. 2:17 · English -
A train’s average speed, then a triangle’s area Two problems on a teacher’s board: the options in a row, every line of working written as it is said, each answer checked before it is drawn. 2:07 · English
Your topic, drawn in about a minute.
Your first 2 videos are free, up to 1 minute each, watermarked. No card required. Full product, every voice and style included.