sec exercises write recursive function named smallcount thatgiven the pointer to the root of bst and key kreturns the number of nodes having key values less than or equal to function smallcount should visit as few nodes in the bst as possible write recursive function named printrange thatgiven the pointer to the root of bsta low key valueand high key valueprints in sorted order all records whose key values fall between the two given keys function printrange should visit as few nodes in the bst as possible write recursive function named checkbst thatgiven the pointer to the root of binary treewill return true if the tree is bstand false if it is not describe simple modification to the bst that will allow it to easily support finding the kth smallest value in th(log naverage case time then write pseudo-code function for finding the kth smallest value in your modified bst what are the minimum and maximum number of elements in heap of height where in max-heap might the smallest element reside show the max-heap that results from running buildheap on the following values stored in an array (ashow the heap that results from deleting the maximum value from the max-heap of figure (bshow the heap that results from deleting the element with value from the max-heap of figure revise the heap definition of figure to implement min-heap the member function removemax should be replaced by new function called removemin build the huffman coding tree and determine the codes for the following set of letters and weightsletter frequency what is the expected length in bits of message containing characters for this frequency distribution