1. For n, enter the number of entries you wish to add to the list 2. Repeat n times: enter a number into the list 3. Enter the target value whose position on the list you wish to find.
Scratch has a premade block: (item # of <thing> in <list name>), which achieves the same result. BinarySearch requires the list to be put in sorted order first. I used the InsertionSort algorithm found here: https://scratch.mit.edu/projects/500428332 Please comment below if you would like me to include the Java or C code. #programming #java #code #binary #search #list