Answer:
It balances a tree when a long path exist in the left subtree of the left of the root.
Explanation:
Rotation is an operation which is performed on the binary tree which changes the structure of the binary tree but it does not interfere with the order of elements.
A single right rotation strategy is basically for re balancing the tree.When there is along path which exists in the left subtree of the left of the root.
Answer:
The algorithm is as follows:
1. Input sentence
2. Input character
3. Length = len(sentence)
4. count = 0
5. For i = 0 to Length-1
5.1 If sentence[i] == character
5.1.1 count++
6. Print count
7. Stop
The program in C++ is as follows:
#include <iostream>
#include <string.h>
using namespace std;
int main(){
char str[100]; char chr;
cin.getline(str, 100);
cin>>chr;
int count = 0;
for (int i=0;i<strlen(str);i++){
if (str[i] == chr){
count++;} }
cout << count;
return 0;}
Explanation:
I will provide explanation for the c++ program. The explanation can also be extended to the algorithm
This declares the string and the character
char str[100]; char chr;
This gets input for the string variable
cin.getline(str, 100);
This gets input for the character variable
cin>>chr;
This initializes count to 0
int count = 0;
This iterates through the characters of the string
for (int i=0;i<strlen(str);i++){
If the current character equals the search character, count is incremented by 1
if (str[i] == chr){ count++;} }
This prints the count
cout << count;
Answer:
Microsoft Windows - More susceptible to viruses
Linux - Limited support system
Apple - Fewer compatible applications
Explanation:
Generally windows is more susceptible to viruses.
Linux is open source meaning it's up to the community to help you.
Apple has been supporting more applications in these coming years but it still lacks the wide range of apps windows supports.
Answer:
A CD-RW (which stands for Compact Disc ReWritable) is a Compact disc that can be recorded and erased multiple times. It can hold data or music. Most of the time it will hold data, since many CD players can not play CD-RWs. During its development, the format was known as CD-E, which stands for Compact Disc Erasable.
The tool that sets rules for both the transport of data packets and the addressing system for a network such as the ARPANET is called; Protocol
<h3>Understanding Protocols</h3>
In computer systems communications, a protocol is defined as a set of rules and regulations that allow a network of nodes to transport and receive data information.
Now, each transport layer in a system of network such as ARAPNET will always have a protocol set such as TCP and IP.
Read more about internet protocols at; brainly.com/question/17820678