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
Tom wants a way to automatically create ads and simplify campaign management, using his resources and Google's machine learning
borishaifa [10]

Answer:

Account product feed and uploaded assets

Explanation:

Account product feed and uploaded assets are needed to accomplish Tom’s aims of creating ads automatically and simplify campaign management as part of his Smart Shopping campaign. With Smart Shopping campaigns, Tom’s existing product feed and assets are combined with Google’s machine learning to show a variety of ads across networks.

3 0
3 years ago
Which of the four control methods is best suited for transfer of large blocks of data?
mihalych1998 [28]

Answer:

3

Explanation:

3 0
3 years ago
The video game machines at your local arcade output coupons depending upon how well you play the game. You can redeem 10 coupons
Lilit [14]

Answer:

coupons = int(input("Enter the number of coupons you win: "))

candy_bars = int(coupons / 10)

gumballs = coupons % 10

print("Candy bars: " + str(candy_bars) + ", Gumballs: " + str(gumballs))

Explanation:

*The code is in Python.

Ask the user to enter the number of coupons

Calculate the number of candy bars, divide the coupons by 10 and typecst the result to int

Calculate the number of gumballs, use the modulo to find the remainder

Print the values

3 0
3 years ago
_______ is a communications protocol used to send information over the web. HyperText Markup Language (HTML). URL (Uniform Resou
nlexa [21]

TCP/IP is a communications protocol used to send information over the web.

Explanation:

TCP / IP, which stands for the Transmission Control Protocol / Internet Protocol, is a set of communication protocols used to connect internet network devices. The whole suite of the Internet Protocol — a set of rules and procedures — is commonly called TCP / IP.  

The TCP / IP protocol suite acts as a layer of abstraction between web applications and the routing / switching fabric. TCP / IP defines how data is shared over the internet by supplying end-to-end communications that specify how the data should be split into packets, signed, distributed, routed and received at the destination.

5 0
3 years ago
Which of the following is a public location that sells Internet access? Internet café Extranet Intranet LogMeIn,
Goshia [24]

Answer:A) Internet cafe

Explanation: Internet cafe is the place that provides the internet service to the public and helps them to access the internet .These cafes can be used by the public who are travelers, people who don't have access at home etc.This internet cafe works on the basis of the hourly rate that it takes from the public.

Rest of the options are incorrect  as intranet and extranet are types of network and LogMeIn is a desktop service .thus, the correct option is option(A).

8 0
3 years ago
Other questions:
  • Given positive integer numInsects, write a while loop that prints that number doubled without reaching 200. Follow each number w
    8·1 answer
  • You type. The word "weather" when you ment "whether" when will the writer or word flag this as a misspelling or a grammar proble
    13·1 answer
  • Which language is the most popular language for writing apple os x?
    9·1 answer
  • Create a dictionary named letter_counts that contains each letter and the number of times it occurs in string1. Challenge: Lette
    14·1 answer
  • Match the keyboard shortcuts to the function they perform
    10·1 answer
  • What specific authentication method has no encryption for user credentials or data, and is not recommended for most applications
    14·1 answer
  • What is the first step that you have to perform before you can add a windows package to a wim file?
    9·1 answer
  • Dr. Wayne is trying to developing techniques to cure Parkinson’s disease by inserting genetic material into patients’ cells to c
    12·1 answer
  • The goal of this problem is to cover all roads with cameras. A camera placed at a station can cover all the roads connected to i
    9·1 answer
  • Resource _____ let you view, manage, and automate tasks on multiple aws resources at a time.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!