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
If you receive an email message you suspect is spam, what should you do?
Alla [95]

Answer:

A.  delete the message without opening it.

Explanation:

Never open emails you don't know who sent it, it could be a hacker trying to get your personal/financial information.

6 0
4 years ago
Which statement is NOT true:
RSB [31]

Answer:

The correct answer for the given question is   "Machine languages can be used to write programs that can run on any machine."

Explanation:

The machine language consist of binary digit i. e 0 and 1 .Computer can understand only the machine language .The machine language consist of code that is written in bits so it is used  to express algorithms.When any program is compiled the compiler are converted into machine code so the machine language is produced by the compiler .

Machine language cannot used to write a program that run on any machine.

5 0
3 years ago
Which of the following is a principle that can improve the efficiency of I/O?
natulia [17]

Answer:

C)

Explanation:

One principle that can improve the efficiency of I/O would be to move processing primitives into hardware. Primitives are a semantic value representing something else such as words or numbers within the programming language. By moving them into hardware they system is able to read them at a much faster speed making the I/O more efficient.

5 0
3 years ago
Read 2 more answers
...............................
Gemiola [76]

............................

Mark me brainliest^^

7 0
2 years ago
Read 2 more answers
Sarah wants to calculate how much of a profit she would make on producing and selling a new product. Sarah should use a _____.
vagabundo [1.1K]
The answer is spreadsheet. I just did this lesson and I got all of the answers right so I know it's correct.
4 0
3 years ago
Other questions:
  • Under what circumstances would it be appropriate to use the sentence method of note taking, and what are the advantages and disa
    7·2 answers
  • Data arranged and stored in a data set
    9·1 answer
  • Average of Grades - Write a program that stores the following values in five different variables: 98, 87, 84, 100, 94. The progr
    8·1 answer
  • Over the past few years a very definite need has arisen in the electrical trades for:
    15·1 answer
  • Write the class definition for a class named Employee. The class should include data members for an employee object%u2019s name
    12·1 answer
  • And tags are examples of stand - alone tags.
    15·1 answer
  • To be fluent in computer language you must learn 8000 __________? (9 letter word)
    5·1 answer
  • Assume a branch instruction bne $t1, $t2, Label is located in 0x00001840 in the instruction memory. The 16-bits branch address i
    6·1 answer
  • Cathy designed a website for a cereal brand. When users view the website, their eyes first fall on the brand name, then they vie
    14·1 answer
  • Look over the image in the top section and choose which piece from the bottom should be placed in the question mark (?) that wou
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!