Most books on data structures assume an imperative language such as C or C++. However, data structures for these languages …