Fill in the missing Java code by following the instructions
Fill in the missing Java code by following the instructions below in bulletpoints.
Search 2D (Table) Binary Tree To access a 2D array you need 2 indexes, e.g. array2d[row][column] The key will be in column 0, the left child index in column 1 and right child index in column 2 The 2D array/table thetable contains a binary tree with the root at row = 0; Write a while loop to search for the value in the variable akey Write an if-else to change the variable row to search the left or right child When the loop completes row must be the slot that equals variable akey Do not declare the variable row, but do initialize and change it during the search. Implement the instructions above by placing your Code here: row =; while () {if () {} else {}}Solution
row = 0;
while (thetable[row][0] != akey){
if(thetable[row][0] < akey){
row = thetable[row][2];//right child
}
else {
row = thetable[row][1];//left child
}
}
