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
Alenkasestr [34]
3 years ago
14

The rmdir command (with no options) can only remove empty directories a. True b. False

Computers and Technology
1 answer:
Anni [7]3 years ago
3 0
True. It will say "directory not empty"
You might be interested in
What is intellectual property rights law ?​
kherson [118]
Intellectual property law deals with the rules for securing and enforcing legal rights to inventions, designs, and artistic works. Just as the law protects ownership of personal property and real estate, so too does it protect the exclusive control of intangible assets.
5 0
2 years ago
What can happen if you do not follow the directions of medicine or the directions from the doctor? (Give 4 examples)​
iren [92.7K]

Answer:

1) Issue at hand will not properly be resolved and another visit to the doctor will have to occur, either to refill the prescription or to try another course of action.

2) Side effects

3) Ineffective

4) If directions are not followed to a tea, money will be waisted on the purchase.

Explanation:

5 0
2 years ago
Given n ropes of different lengths, we need to connect these ropes into one rope. We can connect only 2 ropes at a time. The cos
Lelu [443]

Answer:

Given n ropes of different length, the task is to connect all the ropes into one. We need to connect these ropes in minimum cost. The cost of connecting two ropes is the sum of their lengths.

Eg: Given 4 ropes of length { 3, 7, 9, 4 }

We can connect the ropes in the following way:

1) First, connect the ropes of length 3 and 4. Cost of connecting these ropes is 3 + 4 = 7. Now we have ropes of length { 7, 7, 9 }

2) Then, connect the ropes with length 7 and 7. Now the cost of connecting these ropes is 7 + 7 = 14. Now we have ropes of length { 9, 14 }

3) Finally, connect the two last ropes with cost 9 + 14 = 23.

So, Total Cost of connecting these ropes in the above order is 7 + 14 + 23 = 44.

Approach

Given an array rope[] of length n, where rope[i] is the length of ith rope.

First of all, build minHeap from the given array of rope length, because we want to extract ropes with the minimum length of all in every iteration.

In each iteration:

1) Extract two ropes with minimum length from the minHeap.

2) add both the ropes (cost).

3) add the cost to the result and push cost again in the minHeap.

The main reason for selecting ropes with minimum length in each iteration is: The value that is picked first will be included in the final result more than once. Since we want the minimum cost of connecting ropes, we will pick long length ropes at a later stage to minimize its impact on our final cost.

Time Complexity

The complexity of insertion in minHeap is O(logn). Since we are building heap for n ropes, the overall complexity of building minHeap is O(nlogn).

Then in the iteration, we are extracting minimum value from minHeap and pushing the cost of connecting two ropes back to the minHeap. Extract/Insert operation from minHeap costs O(logn).

So, the Overall time complexity of the problem is O(nlogn).

Space Complexity

We are using space for storing minHeap of the ropes which is equal to the number of ropes we have. So Space complexity of the problem is O(n).

Explanation:

Code is:

int main() {

int t;

scanf("%d", &t);

while(t--) {

    int count, first, second;

    int result = 0;

    scanf("%d", &count);

    priority_queue< int, vector<int>, greater<int> > pq;

    for(int i=0; i<count; i++){

        int ropeLen;

        scanf("%d", &ropeLen);

        pq.push(ropeLen);

    }

    while(pq.size() > 1) {

        first= pq.top(); pq.pop();

        second = pq.top(); pq.pop();

        result += (first+second);

        pq.push(first+second);

    }

    cout<<result<<endl;

}

}

4 0
3 years ago
What does XD mean? I keep seeing people say it and I dont know what it means
Anna007 [38]

Answer: xD = haha

Explanation:

XD looks like a haha face laughing :P

have a good day :)

6 0
2 years ago
Read 2 more answers
Which of the following does every font that you choose communicate, either on a conscious or subconscious level?
sergeinik [125]
I believe it is b so I will just leave it at that

3 0
3 years ago
Read 2 more answers
Other questions:
  • In this digital age of rapid communications, how can you justify the time it takes to stop and revise a message
    10·1 answer
  • Which of these computers was marketed as a computer/game machine?
    15·2 answers
  • If a user has just added a simple triangle shape into a diagram, how can the triangle be adjusted? Check all that apply. by maki
    6·2 answers
  • When programming in Scratch, to make our Sprite walk across the background, in which category would we find the programming bloc
    7·1 answer
  • Can anyone help me with getting bash ubuntu on windows setup?
    15·1 answer
  • Each webpage is assigned a(n) ______, an address that identifies the location of the page on the Internet.
    6·1 answer
  • Special words are those words that start and end with the same letter. [14]
    12·1 answer
  • Which finger is used to press SHIFT key while typing!
    14·2 answers
  • What is the sequence of instructions performed to execute one program instruction
    13·1 answer
  • In cells D6 through D8, enter formulas to calculate the values of the stocks. The formulas should multiply the number of shares
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!