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
Compare and contrast hardware and software.
lesya692 [45]
Hardware:
-physical parts of a computer that cause processing of data
-can be connected (physically) & can touch
- Hardware wares out during/over time
-Hardware failure is random
Software:
-A set of construction that tells a computer exactly what to do
-software is logical in nature
- dose not have an increasing failure rate

Similarities
- Behavior; Users interact with the products in various ways

- Products produce outputs and given inputs

-they have functional (user facing) and non functional (non user facing) requirements

-They are both complex (any representation of product specifications lead to a main structure)


Differences
- Software is easier to change then hardware

- Software testing is done by specialized quality assurance (QA) engineers, while hardware is done by engineers who are creating the product

-Hardware must be designed and tested to work over a range of time and environmental conditions, which is not the case for software

- Hardware designs are constrained by the need to incorporate standard parts

(Hope this helps?)
7 0
2 years ago
Read 2 more answers
What are your undertale + au ships?
fenix001 [56]
What is an undertale? Lol
3 0
3 years ago
Please help me I don't understand. It's Python.
Vitek1552 [10]
It’s , c probably sorry if I’m wrong
8 0
3 years ago
Read 2 more answers
What is the difference between DWT and CWT?
Alexeev081 [22]

Answer:

raspuns:

Explanation:

amandoua sunt cam la fel dar si diferite pe alte parti

4 0
2 years ago
(TCO B) The symbol shown as a three-sided box that is connected to the step it references by a dashed line is what?
Mekhanik [1.2K]

Answer:

Annotation symbol

Explanation:

A flowchart is a diagram that is used to show and represent a workflow, process or algorithm. Flow charts are used in designing processes or programs. Flow charts are usually designed using boxes and arrows.

An annotation symbol is a symbol used in flowchart to hold comments and it is usually represented by a three-sided box connected to the step it references by a dashed line.

7 0
3 years ago
Other questions:
  • What important information is needed if you are installing an oem version of windows 7?
    6·1 answer
  • Which social network site has 1.5 billion actives users per month?
    15·1 answer
  • What could be one rule to help your friend to blog safely
    6·2 answers
  • What do developers do to support software products? explain to users which development process model was used to make the produc
    8·1 answer
  • The signature of a function is determined by
    5·1 answer
  • Which type of NAC agent will be used during the posture assessment before allowing access to the VPN users?
    9·1 answer
  • How to program a game​
    7·2 answers
  • Why is it NOT a good practice to save everything on the desktop?
    6·2 answers
  • U $ er Ideas for R 0 B 1 0 X?
    12·2 answers
  • Describe a new career in computer science that may be created in the future
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!