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
ruslelena [56]
2 years ago
8

What is the page table mainly for?

Computers and Technology
1 answer:
postnew [5]2 years ago
6 0

Answer: See explanation

Explanation:

A page table is used for the tracking and the location of different pages of a task in memory. It helps in showing the mapping of locations between the physical addresses and the virtual addresses.

A page table stores also has the page table entries and this is where the frame numbers are stored as well as the operational status.

You might be interested in
What is the setting an alarm clock output??
Vadim26 [7]
911 call it right now
3 0
3 years ago
Write a program that uses a structure to store the following data about a customer account: Name Address City, State, and ZIP Te
zheka24 [161]

Answer:

Don't know

Explanation:

4 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
If Asa changes the text to bold, he has changed the style. True False
LiRa [457]
True because if you were to bold a text, you have presented that the following text is more important or exemplified. 
4 0
3 years ago
Read 2 more answers
what is the restaurant with the black pom tree and yellow backround three letter name from hi guess the restaurant
vekshin1
In 'N' Out, and KFC (Kentucky Fried Chicken)
7 0
3 years ago
Read 2 more answers
Other questions:
  • You've formatted the first paragraph of a document. What button can you use to apply the formatting from the first paragraph to
    9·2 answers
  • What task did the u.s. government undertake that many people identify as the birth of the internet
    5·2 answers
  • What was one of the first inventions that made it possible to communicate almost instantly?
    11·1 answer
  • Your supervisor has asked you to set up a RAID hard drive array in a tower system, which has a motherboard that uses the B360 ch
    10·1 answer
  • . ------------ means that the two merging companiesbecame history and a new firm
    10·1 answer
  • The graph shows households in the world with internet access from 2003 to 2019. A graph titled Percentage of Households with Int
    6·2 answers
  • What symbol indicates that material has been copyrighted?
    8·2 answers
  • Which of the following statements about the relationship between hardware and software is true? a) Hardware can be present in in
    9·1 answer
  • Define a function below, filter_out_strs, which takes a single argument of type list. Complete the function so that it returns a
    10·1 answer
  • How many different four-letter combinations for a locker password can you make with the lowercase and uppercase forms of the fir
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!