![]() ![]() To search an element in a sorted list, call the binarySearch() function passing the value as an argument. ![]() It works significantly faster than other built-in search functions but requires the list to be sorted in ascending order according to a certain ordering: natural or another one provided in the function parameter. There is one more way to search elements in lists – binary search.
0 Comments
Leave a Reply. |