ScratchData LogoScratchData
Back to Crazyboy_tutor's profile

Binary Search Algorithm

CRCrazyboy_tutor•Created January 29, 2024
Binary Search Algorithm
1
1
4 views
View on Scratch

Instructions

This is a script that runs a Binary Search algorithm. This is a method of searching an ordered array to find the index of target value. It is much faster than Linear Search algorithms which is what Scratch uses for the ( item # of ( thing ) in [ list ] ) block. Note that this will only work for an ordered array since it uses comparisons to rule out most of the available indexes. This code is running every time you press the Green Flag.

Project Details

Project ID958127466
CreatedJanuary 29, 2024
Last ModifiedJanuary 29, 2024
SharedJanuary 29, 2024
Visibilityvisible
CommentsAllowed