0
How to create Linkedlist and Arraylist in Binary search ?
Use Java
3 Answers
+ 1
Strange question
You have arraylist or linkedlist, then divide it into two parts using indexes and then divide and then, while you are not finding element
+ 1
And your data should be sorted
0
import ..util.*
..
create ArrayList<Integer> object
fill it with values
sort it with Collections.sort() - if it is not sorted
search it with Collections.binarySearch()
print result