Académique Documents
Professionnel Documents
Culture Documents
Q1. Find a given element (let 26 or 8th smallest) from the list of elements as given
below by using interpolation and median search( recursive as well as iterative ) and
compare the number of times the recursive statement has been executed. ( Repeat
the same comparison with iterative approaches also).
Q2. Write the median search algorithm recursively by using the pivot as randomly
selected number and middle element . And also execute the q1(i) by your algorithm
and compare the number of swapping made in both of your approaches.
(iii) You have to design a recursive procedure which finds a path from the
given(user i/p) source to given destination(user i/p) and some tiles on the
board( user inputted)are having holes where no movement is
possible.(movement is one step left, right, up, down)
(iv) The given board is having walls on the cells (means that cell is not
traversable). Now design a recursive code which provides the information
whether the given board ( cell having no walls )is traversable or not with
the movement ( 2.5 right, 2.5left, 2.5down only ie. No upward movement).
Note: In q3(i) find at least 10 paths and store them in the file.