Copyright Statement: This is an open access article licensed under a Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, and reproduction in any medium, even commercially as long as the original work is properly cited.
Digital Object Identifier (DOI) : 10.14569/IJACSA.2015.060309
Article Published in International Journal of Advanced Computer Science and Applications(IJACSA), Volume 6 Issue 3, 2015.
Abstract: Study of binary trees has prominent place in the training course of DSA (Data Structures and Algorithms). Their implementation in C++ however is traditionally difficult for students. To a large extent these difficulties are due not so much to the complexity of algorithms as to language complexity in terms of memory management by raw pointers – the programmer must consider too many details to ensure a reliable, efficient and secure implementation. Evolution of C++ regarded to automated resource management, as well as experience in implementation of linear lists by means of C++ 11/14 lead to an attempt to implement binary search trees (BST) via smart pointers as well. In the present paper, the authors share experience in this direction. Some conclusions about pedagogical aspects and effectiveness of the new classes, compared to traditional library containers and implementation with built-in pointers, are made.
Ivaylo Donchev and Emilia Todorova, “Implementation of Binary Search Trees Via Smart Pointers” International Journal of Advanced Computer Science and Applications(IJACSA), 6(3), 2015. http://dx.doi.org/10.14569/IJACSA.2015.060309