00:01
Hello student here elements of the array are given there are total 13 element and the array are 1, 2, 4, 5, 6, 7, 12, 14, 21, 22, 42, 53.
00:10
So now i have to search the element 42 this element i have to search so i have to find number of comparison here.
00:17
So here i will do this problem with the help of a divide and conquer problem.
00:22
So here i will divide the list into the two halves.
00:24
So here i find the middle element at the starting will be 7.
00:28
So this will be the middle element.
00:31
So now i will divide the list into the two halves one is left and then the second one is right half.
00:38
As i know my searching element is 42 so i will go to the right half of the list.
00:44
So here right half of the list here i have done the first comparison now the second comparison come here.
00:49
So here when i come to the right half so my right half list will be this one.
00:55
So this will be so 8, 12, 14, 21, 22, 42, 53.
01:00
So here if i find the middle element that comes this this middle element so it is a middle element and i have to find the 42.
01:08
Now my second comparison now i have to find now i have to split the list into the two half so here is the right half right half so here i will go here and my 42 is here.
01:20
Now i find the middle element that is the third comparison and after this i when i will find the 42 as a middle element then 42 will be compared with the 42 and my element will be found.
01:37
So total comparison first comparison was done when i find the middle element of this...