I have a small problem with the binary search iterative, the algorithm is working good, but if i have more than one element with the same name, the program only shows one, i can't figure out what to do with the code in order to show every single element with the same name.
The problem in on line 8. What do you want to return if there's more than one?
Apart from that, if the array is sorted you need two loops to collect all elements:
The first loop is for the data on the left and the second for the names on the right.