Implementation of Binary Search Trees Via Smart Pointers

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.

Authors and Affiliations

Ivaylo Donchev, Emilia Todorova

Keywords

Related Articles

Characterization of Dynamic Bayesian Network-The Dynamic Bayesian Network as temporal network

In this report, we will be interested at Dynamic Bayesian Network (DBNs) as a model that tries to incorporate temporal dimension with uncertainty. We start with basics of DBN where we especially focus in Inference and L...

FF-MAC : Fast Forward IEEE 802.15.4 MAC Protocol for Real-Time Data Transmission

This paper presents a Fast Forward MAC layer designed for hard real-time applications in wireless sensor networks. This protocol is an enhancement to the IEEE 802.15.4 standard MAC layer proposed for Low-Rate Personal Ar...

Privacy-preserving Twitter-based Solution for Visually Impaired People

Visually impaired people is a big community all over the world. They usually seek help to perform their daily activities such as reading the expired date of food cans or medicine, reading out PIN of a certain ATM Visa, i...

A New Approach for Arabic Handwritten Postal Addresses Recognition 

  In this paper, we propose an automatic analysis system for the Arabic handwriting postal addresses recognition, by using the beta elliptical model. Our system is divided into different steps: analysis, pre-process...

OSPF vs EIGRP: A Comparative Analysis of CPU Utilization using OPNET

Routing is difficult in enterprise networks because a packet might have to traverse many intermediary nodes to reach the final destination. The selection of an appropriate routing protocol for a large network is difficul...

Download PDF file
  • EP ID EP116709
  • DOI 10.14569/IJACSA.2015.060309
  • Views 108
  • Downloads 0

How To Cite

Ivaylo Donchev, Emilia Todorova (2015). Implementation of Binary Search Trees Via Smart Pointers. International Journal of Advanced Computer Science & Applications, 6(3), 59-64. https://europub.co.uk./articles/-A-116709