Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

binary search tree

# Driver Code 
arr = [ 2, 3, 4, 10, 40 ] 
x = 10
  
# Function call 
result = binarySearch(arr, 0, len(arr)-1, x) 
  
if result != -1: 
    print ("Element is present at index % d" % result) 
else: 
    print ("Element is not present in array")
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #binary #search #tree
ADD COMMENT
Topic
Name
5+2 =