This requires splitting the array which contains age and name of the person, and then performing search operation on the name variable and finally print the age if the name is present in the array.
So, far I have only created a 2D array but don't know how to split and then perform the search
String[,] arr = { { "aakif", "25" }, {"ali", "31"} , {"ben","35"}, {"hassnain" ,"45" } };
Dictionary.startandendof the range that you are searching. At some point you will calculate themidpointbetweenstartandendand then update eitherstartorendand assign it the value ofmidpointto continue searching in either the first half or second half of the range.