1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Luda [366]
3 years ago
15

Help to how to write pseudo code to insert a new node to Binary Search Tree. Using C++.

Computers and Technology
1 answer:
dimulka [17.4K]3 years ago
4 0

Answer:

Let the function be Node* ins(Node *root,int k)

if root node is NULL then return new node with data equal to k.

If the k <root->data

root->left=ins(root->left,k);

else if k >root->data

root->right =ins(root->right,k);

At last return root.

Explanation:

Node is always inserted at the at the leaf node.We will search k in the tree if we hit a the leaf node the new node is inserted as the child of the leaf node.

You might be interested in
. Electricians will sometimes call ______ "disconnects" or a "disconnecting means."
arlik [135]

Answer: A: Switches

Explanation:

6 0
3 years ago
What do work places allow a company to do
anygoal [31]
D. They provide a platform for collaboration
8 0
3 years ago
Which of the following changes would be LEAST LIKELY lead to economic growth in a country?
Charra [1.4K]

Answer:

A. declines in labor productivity

Explanation:

6 0
3 years ago
Freeeeeeee brainliest!!!
kondaur [170]

Answer:

Oh Thanks :)

Explanation:

7 0
3 years ago
If you want to present slides to fellow students or co-workers,which productivity software should you use to create them?
Tamiku [17]
Just use prezi.com hope that helps.
6 0
4 years ago
Read 2 more answers
Other questions:
  • How to use javascript libraries in javascript code?
    9·1 answer
  • Enterprise application integration (eai) software enables users to model the business processes and interactions that should occ
    8·1 answer
  • This is question 2.5 Computer Science and I don't understand what is wrong<br><br>​
    15·1 answer
  • You turn your computer on and the computer will not boot up. What is something you should do to diagnose the problem?
    6·2 answers
  • You are having problems on your Windows 7 computer and you pull up Device Manager to see if there are any alerts. Two of your de
    11·1 answer
  • A manager would like information on the knowledge base searches conducted by customers and call center agents. Which two metrics
    10·1 answer
  • What is the difference between a Is your Milling machine and grinding machine
    6·1 answer
  • What is the turns ratio of the transformer T10261
    5·1 answer
  • How do you think weather can affect sailing?<br><br>What would be good sailing weather?​
    9·1 answer
  • reagan's firm has not had to make large investments in computer or networking hardware or in personnel to maintain the hardware
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!