C++: function swapSubTrees for class binaryTreeType
Not what you're looking for?
Write a function, swapSubTrees, that swaps all of the left and right subtrees of a binary tree. Add this function to the class binaryTreeType and create a program to test this function.
Attached is the class binaryTreeType to work on along with what I think is an algorithm to do the logic. I need the function to work and a program to test it. Can write a main method right under the binaryTreeType class I have attached.
Purchase this Solution
Solution Summary
Solution also shows what a sample run of the program will look like, that verifies the subtrees swapping.
Solution Preview
Your existing code did not have insert function to add new nodes to tree, and it had some bugs as well. All those issues have also been fixed in attached 302698.cpp (tested with "g++ -Wall"). Please ...
Purchase this Solution
Free BrainMass Quizzes
Basic Computer Terms
We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.
Word 2010: Table of Contents
Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.
Basic Networking Questions
This quiz consists of some basic networking questions.
Javscript Basics
Quiz on basics of javascript programming language.