Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You have to use this code also: #include using namespace std; #include GRAPH.h void main() { char vertex[] = {'S', 'R', 'G', 'B', 'O', 'T',

image text in transcribed

You have to use this code also:

#include using namespace std; #include "GRAPH.h"

void main() { char vertex[] = {'S', 'R', 'G', 'B', 'O', 'T', 'V'}; int numVertices = sizeof(vertex)/sizeof(char); GRAPH g(vertex, numVertices);

g.setEdge('S', 'R', 10, true); g.setEdge('B', 'S', 80, true); g.setEdge('S', 'T', 120, true); g.setEdge('G', 'R', 40, true); g.setEdge('R', 'O', 60, true); g.setEdge('R', 'V', 120, true); g.setEdge('R', 'T', 90, true); g.setEdge('O', 'G', 100, true); g.setEdge('G', 'B', 30, true); g.setEdge('O', 'B', 80, true); g.setEdge('T', 'O', 20, true); g.setEdge('V', 'T', 30, true);

cout

Enter integers through the keyboard. While entering the numbers, create a binary search tree. For a NULL node enter - 1. For the created binary tree write its preorder, inorder, postorder and level order traversals. Then, add a function to find the node with the qreatest value in the tree (its value and address). If the first value that is entered is equal to 1, then don't print the tree, its traversals or the node with the greatest value, but instead only print a message that the tree is empty. Example output

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

Students also viewed these Databases questions

Question

What is the output of this java code

Answered: 1 week ago

Question

Discuss the various types of policies ?

Answered: 1 week ago

Question

Briefly explain the various types of leadership ?

Answered: 1 week ago

Question

Explain the need for and importance of co-ordination?

Answered: 1 week ago

Question

Explain the contribution of Peter F. Drucker to Management .

Answered: 1 week ago

Question

Assess three steps in the selection process.

Answered: 1 week ago

Question

Identify the steps in job analysis.

Answered: 1 week ago