Quote:
please provise solution for this problem and explain how to solve
We are not here to do your work for you. This is your assignment so you are expected to at least make the effort to solve it. As to how to do it, that should be explained in the question, but I am not sure what is meant by
"the number of unsuccessful attempts made to search".