Problem:
Consider the function LSEARCH(d, L) that returns the last vertex in L that contains data d (or nil if d is not in L); that is, if there is more than a copy of d in L, then it returns the last one encountered when traversing the list from the first to the last item.
Required:
Question 1- Give pseudo-code for LSEARCH that works from the first to the last element.
Question 2- Give pseudo-code for LSEARCH that works from the last to the first element.
Please read all the questions carefully and answer them.