Draw recursion tree for BinarySearch called on an array [1, 3,7, 8, 10, 13, 20, 22], and searching for key K = 2. At each node ofthe tree, record the values of i, j. For example, initial node willhave 1..8 recorded on it.
6 function BinarySearch(Al], i, j, K) if (i>j) then return -1 2 4 5 if (K = A[midp) then 6 | index ← midp 7
OR
OR