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
muminat
3 years ago
7

Explain how to implement two stacks in one array A[1..n] in such a way that neither stack overflows unless the total number elem

ents in both stacks together exceeds n. Show your work for the new PUSH,POP operations
Computers and Technology
1 answer:
algol [13]3 years ago
5 0

Answer:

Check explanation

Explanation:

Two stacks can make use of one array by utilizing various stack pointers that begins from different ends of an array. Looking at the array A[1...n], the first stack will drive elements that starts from position 1 as well as to move its' pointer to n.

The Second stack will begin at the n position and motion its' pointer to 1. The best likely divide is to offer each stack a half of an array. whenever any of two stacks transverse the half-point, an overflow can happen but for that overall number of elements, it must be n

You might be interested in
Jana works in a call center helping people who are having trouble setting up their
olchik [2.2K]

Answer:

Information Support and Services

Explanation:

She works helping people setting up their accounts so she supports with information from her services

4 0
3 years ago
Read 2 more answers
What is an allocation unit?
sdas [7]
It is a unit of disk space allocation for files and directories. Hope this helps :) 
5 0
3 years ago
What set of code correctly initializes all elements of the array ar to the value 0, given the declaration
Veronika [31]

Answer:

The correct answer is:

C. ndx = 0;

while (ndx < 3) {

ar[ndx] = 0;

ndx++;

}

Explanation:

The declaration given is:

int ar[3];

This means the array consists of three locations and is named as ar.

We know that the indexes are used to address the locations of an array and the index starts from 0 and goes upto to 1 less than the size of the array which means the indexes of array of 3 elements will start from 0 and end at 2.

Now in the given options we are using ndx variable to run the while loop.

So the code to assign zero to all elements of array will be

ndx = 0;

while(ndx<3)

{

ar[ndx] = 0;

ndx++;

}

Hence, the correct answer is:

C. ndx = 0;

while (ndx < 3) {

ar[ndx] = 0;

ndx++;

}

7 0
3 years ago
Which of the following sentences use the subjunctive mood correctly?Check all that apply. a. Dr. Franklin wishes he were the one
vredina [299]

Answer:

a. Dr. Franklin wishes he were the one who had invented the new web application.

b. If he were willing to submit the proposal, we might win the bid.

Explanation:

The subjunctive mood is when we're talking about wishes, doubts, and possibilities, in this case, we have two examples, where Dr. Franklin wishes to invent the new web application, and the other sentence is a possibility because he believes that they can win the bid. The last example is an affirmation.

4 0
3 years ago
Which methods can you use to migrate user settings from windows 8.1 to windows 10?
seropon [69]

Windows Easy Transfer is used  to migrate user settings from windows 8.1 to windows 10,.

<h3>What is Windows Easy Transfer?</h3>

Windows Easy Transfer exists as a specialized file transfer program developed by Microsoft that permits users of the Windows operating system to transfer personal files and locations from a computer running an earlier version of Windows to a computer running a newer version.

The Windows Easy Transfer utility can be utilized to back up data from a computer before completing an upgrade or clean install of the Windows 8 operating system and then restore the data to the computer after the Windows 8 operating system exists installed.

Hence, Use Windows Easy Transfer. Copy the user profile from the old computer to the new computer. Complete an upgrade over the top of the old operating system. utilize the User State Migration Toolkit.

To learn more about Windows Easy Transfer refer to:

https://brainly.in/question/2787534

#SPJ4

7 0
2 years ago
Other questions:
  • The memory allocated for a float value is ____ bytes.
    9·1 answer
  • Consider the following recurrence, defined for n a power of 4 (for the time of some algorithm): T(n) = 3 if n = 1 2T(n/4) + 4n +
    10·1 answer
  • Communications technology and the Internet can be used to reduce the time and costs involved in disseminating financial statemen
    14·1 answer
  • What is the meaning of Re:?
    12·2 answers
  • Please complete the following questions. It is important that you use complete sentences and present the questions and answers w
    12·2 answers
  • How to improve a poor game design puzzles
    11·1 answer
  • What is a cloud in the world of computing
    7·1 answer
  • SOMEONE HELP ME!!!!!
    8·1 answer
  • Best practices and trends for technology integration
    10·1 answer
  • Information to develop a project network is collected from the.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!